For the moment, Fatiando is only tested on Python 2.7. Support for Python >= 3.5 is planned for future releases. If you’d like to help us add support for Python 3, please get in touch through the mailing list.
We recommend using the Anaconda Python distribution to ensure you have all
dependencies installed and the
conda package manager available.
Installing Anaconda does not require administrative rights to your computer and
doesn’t interfere with any other Python installations in your system.
You can install Fatiando and all it’s dependencies using the
manager by running:
conda install fatiando --channel conda-forge
The above command will not install Mayavi automatically because it requires an older version of numpy (1.9). This means that, if you want to install Mayavi, you won’t be able to use the latest versions of most libraries, particularly matplotlib > 1.4. However, if you do want Mayavi, you can install Fatiando compatible numpy 1.9 by using:
conda install fatiando mayavi --channel conda-forge
Be aware that this will likely downgrade your installed libraries to be compatible.
You can also install Fatiando using the pip package manager:
pip install fatiando
However, this will require that you already have all dependencies installed as well as a C compiler.
On Windows you might get an error saying that
Microsoft Visual C++
is required (Unable to find vsvarsall.bat). like the following:
This is because you don’t have the Microsoft C compiler installed. Follow the link in the error message (http://aka.ms/vcpython27) to download the Microsoft Visual C++ Compiler for Python 2.7. Install it and install Fatiando again.
First, make sure you have all dependencies installed and a C compiler available (see the pip instructions above). To install the latest version from Github:
pip install https://github.com/fatiando/fatiando/archive/master.zip
or if you have git installed and want to see the code:
git clone https://github.com/fatiando/fatiando.git cd fatiando pip install -e .
Note that the
fatiando.__version__ variable has the current version
number. If you install from PyPI or conda-forge, this will be something like
'0.2'. If you installed from Github, this will be the latest commit hash.
This way you can track exactly what version of Fatiando generated your results.
Fatiando requires the following dependencies for running:
The following are also recommended but optional:
You can install all of these dependencies using
conda by running the
following command on a terminal (or
cmd.exe on Windows):
conda install numpy scipy numba future matplotlib pillow jupyter basemap mayavi
You can test your install by running our test suite. We use py.test to
manage our tests, so you’ll need to have it installed. You can do this by
conda install pytest if you use
pip install pytest
if you use
pip. After that, you can run the tests by running the following
in the Python (or IPython) interpreter:
import fatiando fatiando.test()
Alternatively, you can run the following from the command line (or
python -c "import fatiando; fatiando.test()"
That should run all our automated tests (it might take a few minutes).
If any of the tests fail or you get an error message or weird result from a recipe, please write to the mailing list. To make it easier for us to debug you problem, please include the following information:
Traceback: ...) or result (figure, numbers, etc)
We really appreciate the feedback! Reporting problems helps us try to make Fatiando better and easier to install.