Installation
[1] System Requirements
RedPlanet is supported on the following platforms, as verified by our automated tests on GitHub Actions:
- Operating Systems — Linux, MacOS, and Windows
- Python Version — 3.10 to 3.12
- We plan to add support for 3.13 once pyshtools is updated.
- To see the official support timeline for all versions of Python, look here or here.
If you're having installation issues or want to request support for earlier versions of Python, feel free to send an email or open an issue on GitHub. It might only take a few minutes to add compatibility.
[2] Installation
For beginners, I wrote a guide which explains the concepts, steps, and suggested tools for installing Python and packages (relevant xkcd). For intermediate/advanced users, I recommend checking out a new tool called uv
by Astral.
Past that, install from PyPI with pip install redplanet
.
We'd be happy to upload to conda-forge upon request, feel free to send an email or open an issue on GitHub.
[3] Dependencies
"Installation Size"
For convenience, we provide an estimated size for each package — these are ROUGH ESTIMATES and can vary wildly based on your system and combinations of dependency groups (e.g. pyshtools
requires scipy
, so we can't remove the latter without removing the former):
- Low: < 5MB
- Medium: 5-50MB
- High: > 50MB
For reference, installing ALL dependencies (including developer dependencies, which normal users will never need) in a fresh Python environment takes ~1GB.
[3.1] Required Dependencies
Included in pip install redplanet
Package | Purpose | Minimum Version | Installed Size |
---|---|---|---|
numpy | Essential numerical computing | 2.1.1 | High |
pyshtools | Spherical harmonic operations (moho & magnetic field) | 4.13.1 | Medium |
pandas | Tabular/2D data (GRS & magnetic source depths) | 2.2.2 | High |
python-calamine | Excel file parsing (engine for pandas) | 0.3.1 | Low |
cartopy | Defining the Martian ellipsoid and solving geodesic problems | 0.24.1 | Medium |
scipy | Scientific computing algorithms | 1.14.1 | High |
xarray | Multi-dimensional data handling | 2024.9.0 | Medium |
xxhash | Fast hashing for data validation | 3.5.0 | Low |
[3.2] Optional Dependencies
For additional features, you'll need to install additional packages.
[3.2.1] Interactive/Plotting (recommended)
pip install "redplanet[interactive]"
Package | Purpose | Minimum Version | Installed Size |
---|---|---|---|
jupyter | Interactive notebooks, extremely useful | 1.1.1 | High |
matplotlib | Static 2D plots | 3.9.2 | Medium |
plotly | Interactive 2D/3D plots | 5.24.1 | Medium |
[3.2.2] Reproduce Datasets
pip install "redplanet[generate-datasets]"
Package | Purpose | Minimum Version | Installed Size |
---|---|---|---|
dask | Parallel computing (large DEM datasets) | 2024.9.0 | Medium |
rioxarray | Geospatial raster processing (reprojecting DEM maps) | 0.17.0 | Medium |
zarr | Chunked/compressed array storage (large DEM datasets) | 2.18.3 | Low |
Note you can install both sets of optional dependencies with a single command: pip install "redplanet[interactive,generate-datasets]"
.