Registry / data / sunpy
library7.1.2pypypi✓ verified 85d ago

SunPy is the core package for solar data analysis in Python, providing data structures, coordinate transformations, and visualization tools for solar physics. Current version 7.1.2 (requires Python >=3.12). Released approximately every 3-4 months.

pip install sunpy[all]
INSTALL
IMPORT
SIG · SUNPY
S
sunpy
datapythonv7.1.2
Install
34.3s avg
Import
11105ms
Disk
813MB
Pass rate
4/ 10
Env Coverage4 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v7.0.5 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
✕ build_error
✕ build_error
py 3.11
✕ build_error
✓ 33.6s
py 3.12
✕ build_error
✓ 31.5s
py 3.13
✕ build_error
✓ 32s
py 3.9
✕ build_error
✓ 40.2s
813MB installed
● package 813MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Map
import sunpy.map
from sunpy import Map
Map is a module, not a class; use sunpy.map.Map for the class
sunpy.map.Map
import sunpy.map; smap = sunpy.map.Map(...)
from sunpy.map import Map
Direct import of Map is possible but discouraged due to namespace conflicts with built-in map()

Downloads an AIA 193 Å image from JSOC and displays it

import sunpy.map import astropy.units as u from sunpy.net import Fido, attrs as a # Download an AIA 193 image (requires internet) result = Fido.search(a.Time('2020-01-01 00:00:00', '2020-01-01 00:00:10'), a.Instrument.aia, a.Wavelength(193*u.angstrom)) files = Fido.fetch(result)[0] # Load and plot map m = sunpy.map.Map(files) m.plot()
sunpy --version
Debug
Known issues
breakingsunpy 7.x requires Python >=3.12; dropped support for Python 3.10 and 3.11.
fix
Upgrade to Python 3.12 or later.
affects: >=7.0.0
deprecatedsunpy.coordinates.frames.HeliographicStonyhurst no longer accepts 'deg' as input unit by default; must use Quantity with appropriate units.
fix
Use astropy.coordinates.SkyCoord with proper astropy.units, e.g., coord = SkyCoord(10*u.deg, 20*u.deg, frame='heliographic_stonyhurst').
affects: >=6.0.0
gotchaFido.fetch returns a list of paths, but some downloaders (e.g., JSOC) can return paths that are relative; always resolve to absolute path before using in Map.
fix
Use str(Path(files[0]).resolve()) or pass the path through sunpy.map.Map.
affects: all
gotchasunpy.map.Map() requires a FITS file or array; passing a URL directly will fail.
fix
Download the file first using Fido.fetch or another download method, then pass the local path.
affects: all
Errors
Common errors & fixes
ImportError: cannot import name 'Map' from 'sunpy'
Using 'from sunpy import Map' which imports the module, not the class.
fix
Use 'import sunpy.map' then 'sunpy.map.Map'.
TypeError: Cannot parse unit from input
Passing plain numbers to coordinate constructors without astropy units.
fix
Use astropy.units, e.g., coord = SkyCoord(10*u.deg, 20*u.deg, frame='heliographic_stonyhurst').
sunpy.net.vso - VSOClient error: No data found for the given query
VSO query parameters too restrictive or server issue; JSOC may have different availability.
fix
Broaden time range or use different instrument/wavelength. Consider using Fido with attrs from sunpy.net.attrs.
Upgrade
Version history
7.1.2latest on PyPI · released Apr 19, 2026
Audit
Dependencies
astropyrequiredCore dependency for units, coordinates, and FITS handling
drmsoptionalAccess JSOC DRMS data export (e.g., HMI, AIA)
parfiveoptionalParallel file download client
Agent activity
17 hits · last 30 days
node
14
OpenAI (training)
1
Resources
sunpy — pip install sunpy · libregistry