Installation
Due to the way different Operating Systems handle dependencies specific instructions for the preferred installation method are provided for each of the most used OS's "GNU/Linux", "MacOS" and "Windows".
Preferred method, by platform
GNU/Linux
- Install python 3. Although python 3 is already installed by default in most modern Linux distributions, sometimes it may not be available (you can type
python3 --version
from a terminal to see if python 3 is installed. If it is, you will have something similar toPython 3.6.1
printed on your terminal, if it isn't you will either see a "command not found" error, or a helpful message on how to install python 3). In "Debian based" distributions (such as Ubuntu) you can install python 3 by opening a terminal an running the commandsudo apt-get install python3
. In other Linux distributions you can similarly use your package manger to install it. If you do not have administration privileges in your environment, please ask your sysadmin to install python 3 for you. This is the only step that has a hard requirement on administrative privileges. - Install
pip
.pip
is a package manager for python. Ifpip
is not already installed in your system, you can follow the official instructions on how to get it here. Make sure you run get-pip.py using python 3 in order to be able to use pyRona. Like this:python3 get-pip.py
- Install pyRona. Now that you have python 3 and
pip
installed, installing pyRona is just one command away:pip3 install pyRona --user
. The--user
option installs the software to a local directory, ensuring you do not need administration privileges to perform the installation. - Using pyRona. Running the command from step 3 will install the program to
~/.local/bin
. You can either run it by calling it directly~/.local/bin/pyRona
or by adding the location~/.local/bin
to your shell$PATH
(here is a good guide on how to do it) and just callingpyRona
.
MacOS
- Install python 3. MacOS comes with python 2.7 installed by default, (Mac OSX versions before "Sierra" does not have any version of python installed) but in order to run pyRona you will need python 3.4 or above. You can follow this comprehensive guide to do it.
- Install
pip
.pip
is a package manager for python. You can use the guide from step 1 to install it on your system. - Install pyRona. Now that you have python 3 and
pip
installed, installing pyRona is just one terminal command away:pip3 install pyRona --user
. The--user
option installs the software to a local directory, ensuring you do not need administration privileges to perform the installation. - Using pyRona. Running the command from step 3 will install the program to
~/Library/Python/[PYTHON_VERSION]/bin
(wherePYTHON_VERSION
is the version of python you used, eg.3.6
). You can either run it by calling it directly~/Library/Python/[PYTHON_VERSION]/bin/pyRona
or by adding the location~/Library/Python/[PYTHON_VERSION]/bin
to your shell$PATH
(here is a good guide on how to do it) and just callingpyRona
.
Windows
- Install python 3. No version of Windows comes with python installed by default, but you can install it from here. If you need help installing python 3 for windows, here is the official guide.
- Install
pip
.pip
is a package manager for python. Using the instructions from the guide from step 1 will installpip
for you. - Install pyRona. Now that you have python 3 and
pip
installed, installing pyRona is just one terminal command away:C:\Python3.6\python.exe -m pip install pyRona
. Don't forget to change the path "python3.6" to whatever version of python 3 you have installed. - Using pyRona. Running the command from step 3 will install the program to
C:\Python3.6\Scripts
. You can run it by calling it directlyC:\Python3.6\Scripts\pyRona.exe
.
Important note
Note that pyRona will also automatically install two R scripts called Baypass_workflow.R
and LFMM_workflow.R
under ~/.local/bin
that can be used to automate the usage of the upstream software BayPass and LFMM, whose output can be used as input for pyRona. For more information on these scripts, please see the baypass and LFMM sections.
Alternative methods (AKA 'expert mode')
You can also run pyRona by simply cloning the repository (or
downloading one of the releases), and placing the contents of the directory
"pyRona", on any location on your $PATH
environment variable var.
Another alternative, is the setup.py
method. This can be used either by running python3 setup.py install
(or even
better, pip3 install .
) from the distribution's root directory (where
setup.py
is located).
Installing cartopy
pyRona requires the cartopy library to draw RONA maps. It is optional and the module will only be required if you specifically ask pyRona to draw a map.
Below are instructions on how to get it to run on three different Operating Systems. After running them, pyRona should be able to draw RONA maps using the -map
argument.
GNU/Linux
Under GNU/Linux OSes, cartopy
requires the proj4
and geos
libraries. On Ubuntu and Debian based OSes, you can install it using the following command:
sudo apt-get install libproj-dev libgeos-dev
Then you can proceed to install cartopy
and its dependencies scipy
and cython
:
pip install cartopy scipy cython --user
Windows
Under Windows OSes, you can install the unofficial cartopy
binaries, which can be found here.
You should still install scipy
and cython
via pip
:
C:\Python3.6\python.exe -m pip install scipy cython
MacOS
Installing cartopy
under OSX does not seem to be an easy task. I really would appreciate some help here. The pip
parts should be similar to those of GNU/Linux, but getting proj4
and geos
libraries installed might prove trickier.