@@ -45,45 +45,78 @@ Other optional dependencies include:
45
45
But, if you want to contribute to pysteps or edit the package, you need to install
46
46
pysteps in development mode: :ref: `Contributing to pysteps <contributor_guidelines >`.
47
47
48
- Anaconda install (recommended)
49
- ------------------------------
50
-
51
- Conda is an open-source package management system and environment management
52
- system that runs on Windows, macOS, and Linux.
53
- Conda quickly installs, runs, and updates packages and their dependencies.
48
+ Install with conda/mamba (recommended)
49
+ --------------------------------------
50
+
51
+ `Conda <https://docs.conda.io/ >`_ is an open-source package management system and environment
52
+ management system that runs on Windows, macOS, and Linux.
53
+ `Mamba <https://mamba.readthedocs.io/ >`_ is a drop-in replacement for conda offering
54
+ better performances and more reliable environment
55
+ solutions. Mamba quickly installs, runs, and updates packages and their dependencies.
54
56
It also allows you to easily create, save, load, or switch between different
55
57
environments on your local computer.
56
58
57
- Since version 1.0, pysteps is available in conda-forge, a community-driven
58
- package repository for anaconda.
59
-
60
- There are two installation alternatives using anaconda: install pysteps in a
61
- pre-existing environment or install it new environment.
62
-
63
- New environment
64
- ~~~~~~~~~~~~~~~
59
+ Since version 1.0, pysteps is available on `conda-forge <https://conda-forge.org/ >`_,
60
+ a community-driven package repository for conda packages.
65
61
66
- In a terminal, to create a new conda environment and install pysteps, run ::
62
+ To install pysteps with mamba in a new environment, run in a terminal ::
67
63
68
- $ conda create -n pysteps
69
- $ source activate pysteps
64
+ mamba create -n pysteps python=3.10
65
+ mamba activate pysteps
70
66
71
- This will create and activate the new python environment. The next step is to
72
- add the conda-forge channel where the pysteps package is located::
67
+ This will create and activate the new python environment called 'pysteps' using python 3.10.
68
+ The next step is to add the conda-forge channel where the pysteps package is located::
73
69
74
- $ conda config --env --prepend channels conda-forge
70
+ conda config --env --prepend channels conda-forge
75
71
76
72
Let's set this channel as the priority one::
77
73
78
- $ conda config --env --set channel_priority strict
74
+ conda config --env --set channel_priority strict
79
75
80
76
The latter step is not strictly necessary but is recommended since
81
- the conda-forge and the default Anaconda channels are not 100% compatible.
77
+ the conda-forge and the default conda channels are not 100% compatible.
82
78
83
79
Finally, to install pysteps and all its dependencies run::
84
80
85
- $ conda install pysteps
81
+ mamba install pysteps
82
+
83
+ Install pysteps on Apple Silicon Macs
84
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
85
+
86
+ On conda-forge, pysteps is currently compiled for Mac computers with Intel processors (osx-64).
87
+ However, thanks to `Rosetta 2 <https://support.apple.com/en-us/HT211861 >`_ it is
88
+ possible to install the same package on a Mac computers with an Apple Silicon processor
89
+ (arm-64).
90
+
91
+ First, make sure that Rosetta 2 is installed::
92
+
93
+ softwareupdate --install-rosetta
94
+
95
+ Use mamba to create a new environment called 'pysteps' for intel packages with python 3.10::
96
+
97
+ CONDA_SUBDIR=osx-64 mamba create -n pysteps python=3.10
98
+ mamba activate pysteps
99
+
100
+ Make sure that conda/mamba commands in this environment use intel packages::
86
101
102
+ conda config --env --set subdir osx-64
103
+
104
+ Verify that the correct platform is being used::
105
+
106
+ python -c "import platform;print(platform.machine())" # Should print "x86_64"
107
+
108
+ Finally, run the same pysteps install instructions as given above::
109
+
110
+ conda config --env --prepend channels conda-forge
111
+ conda config --env --set channel_priority strict
112
+ mamba install pysteps
113
+
114
+ We can now verify that pysteps loads correctly::
115
+
116
+ python -c "import pysteps"
117
+
118
+ Note that the first time that pysteps is imported will typically take longer, as Rosetta 2
119
+ needs to translate the binary code for the Apple Silicon processor.
87
120
88
121
Install from source
89
122
-------------------
@@ -93,8 +126,6 @@ to adhere to the `PEP517 standards <https://www.python.org/dev/peps/pep-0517/>`_
93
126
Using ``pip `` instead of ``setup.py `` guarantees that all the package dependencies
94
127
are properly handled during the installation process.
95
128
96
- .. _install_osx_users :
97
-
98
129
OSX users: gcc compiler
99
130
~~~~~~~~~~~~~~~~~~~~~~~
100
131
@@ -134,7 +165,6 @@ the homebrew installation. For example::
134
165
export CC=/usr/local/Cellar/gcc/8.3.0/bin/gcc-8
135
166
export CXX=/usr/local/Cellar/gcc/8.3.0/bin/g++-8
136
167
137
-
138
168
Then, you can continue with the normal installation procedure described next.
139
169
140
170
Installation using pip
0 commit comments