2. Installation and Upgrades¶
2.1. Requirements¶
2.1.1. Python¶
Pysmo is built on top of standard Python and uses several extra Python libraries as well. We develop and test pysmo on Python versions 3.6 and newer. Pysmo may run on older versions too, but we strongly suggest upgrading Python should you be running an older version (not just for pysmo!).
2.1.2. Compilers¶
2.1.2.1. C¶
While pysmo itself does not use C, some of the Python libraries it uses potentially require a C compiler during installation. This may vary depending on computer platform, or Python version/distribution used.
2.1.3. Operating System¶
Pysmo is designed to run on UNIX like systems (e.g. Mac OSX and Linux). Installation on Windows is probably possible (since Python can be installed on almost any platform), though untested.
2.2. Installing Pysmo¶
2.2.1. pip - Python package installer¶
Pysmo is available as a package from the Python Package Index. This means it can be easily installed with the pip
command (available by default since Python version 3.4).
Caution
It is possible to have multiple versions of Python installed on a computer. If this is the case, then there will also be multiple versions of the pip
command. It is therefore important to use the pip
command belonging to the Python version you intend to use for pysmo! Running pip --version
will show you which Python version it belongs to.
Note
On some systems Python 2 and Python 3 are installed alongside eachother. Typically there is a pip
command belonging to Python 2 and a pip3
command belonging to Python 3.
2.2.2. conda users¶
If you are using conda to manage Python packages, we recommend installing pysmo dependencies with conda
before installing pysmo with pip
. To do so issue this command:
$ conda install scipy numpy matplotlib pyyaml pyproj
Note
Similarly, if you are using a package manager on Linux, or something like brew or macports on OSX, you may want to install these dependencies (if available) via those mechanisms instead of pip
.
2.2.3. Installing pysmo with pip¶
To install the latest stable version of pysmo and all dependencies not already installed, simply issue this command:
$ pip install pysmo
Caution
Unless you know what you are doing, we recommend to not install pysmo with administrative priveliges (i.e. using sudo or the root account). If the above command fails due to insuffienct rights, run the same command with the --user
flag:
$ pip install --user pysmo
If you wish to install the latest developement version of pysmo instead of the stable release:
$ pip install git+https://github.com/pysmo/pysmo
Note
It is possible to install the stable release alongside the development version. Please read Developing pysmo for instructions.
2.2.4. Example Data¶
Get the repository data-example from Github. There is some example code inside data-example/example_pkl_files that will be needed for later demonstrations.
2.3. Upgrading pysmo¶
Upgrading pysmo with pip
is done with the same command used to install, with the addition of the -U
flag:
$ pip install -U pysmo
Note
If you used the --user
flag during installation you also need to use it while upgrading
2.4. Uninstalling pysmo¶
To remove pysmo from your system with pip
run this command:
$ pip uninstall pysmo
Note
Unfortunately pip
currently does not remove dependencies that were automatically installed. We suggest running pip list
to see the installed packages, which can then also be removed using pip uninstall