Build TomoPy from source!
I suggest that you use the conda
package manager to do so, but if you insist you can also use pip.
With conda:
- Install strict dependencies:
*
conda install six numpy scipy h5py scikit-image matplotlib
* Most other dependencies you can find on dgursoy channel:conda install -c dgursoy tifffile pywavelets dxchange
Note: installing dxchange from dgursoy channel will take care of optional dependencies as well. - Install optional dependencies (you only need to do so if installing [dxchange]http://dxchange.readthedocs.io from source):
*
conda install astropy
andconda install -c dgursoy dxfile edffile spefile netcdf4 olefile
With pip:
- Install strict dependencies:
*
pip install six numpy scipy h5py scikit-image matplotlib tifffile pywavelets
* You need to install dxchange, either from conda as listed above or from source with:python setup.py install
from the top level directory of the source code. - Install optional dependecies:
*
pip install astropy netcdf4 olefile
. * The missing optional dependecies are not on PyPi, but you can still install from conda as detailed above.
NOTE: If building on OS-X make sure you have xcode command line tools installed: xcode-select --install
- Download the FFTW 3.3.4 source
- Extract the tar file:
tar xvf fftw-3.3.4.tar.gz
and move the source code to you prefered location. cd
into the extracted fftw-3.3.4 directory.- Build fftw (we will do this as required by pyFFTW, so both TomoPy and pyFFTW can use the same FFTW libraries):
*
./configure --enable-shared --enable-threads --disable-fortran --enable-float --enable-sse
*make
*make install
*You may need to use sudo for this. * Now 2 more times to support the required data types: *./configure --enable-shared --enable-threads --disable-fortran --enable-long-double
*make
*make install
*./configure --enable-shared --enable-threads --disable-fortran --enable-sse
*make
*make install
* NOTE:--sse
option is for Pentium III+ processors, you may need to use a different option depending on the arquitecture you are running on. * Finally:cd tests && make check-local
. If all test passed then you're well on your way.
We left out pyFFTW, which is also a strict dependecy. You can install from conda from dgursoy channel or one of these several other channels. But since we built FFTW3 lets go ahead and use pip:
pip install pyfftw
- clone the official repo or better yet create your own fork and clone that.
- In the top level directory of the tomopy source code:
python setupy.py build
- And finally
python setup.py install
orpython setupy.py develop
if you are planning to develop and contribute.
Don't forget to also install nose for unit tests!
Here is a table summarizing TomoPy's dependencies and where you can install them from.
###TomoPy Dependencies
Dependency | Package | Install with | Notes |
---|---|---|---|
Strict | FFTW | make | |
Strict | six | conda/pip | |
Strict | numpy | conda/pip | |
Strict | scipy | conda/pip | |
Strict | h5py | conda/pip | with pip make sure hdf5 libraries are installed |
Strict | scikit-image | conda/pip | |
Strict | matplotlib | conda/pip | required by scikit-image |
Strict | tifffile | conda/pip | conda on dgursoy channel |
Strict | pywavelets | conda/pip | conda on dgursoy channel |
Strict | pyFFTW | conda/pip | pip requires building FFTW/conda on dgursoy channel |
Strict | dxchange | conda/source | conda on dgursoy channel/ dxchange source |
Optional | astropy | conda/pip | |
Optional | netcdf4 | conda/pip | conda on dgursoy channel |
Optional | olefile | conda/pip | conda on dgursoy channel |
Optional | dxfile | conda | conda on dgursoy channel |
Optional | spefile | conda | conda on dgursoy channel |
Optional | edffile | conda | conda on dgursoy channel |
note for anyone reading this - while I cannot speak to the dependencies, the last few steps for building TomoPy are valid for TomoPy < 1.5.