TomoPy from source!Build
First you need to install TomoPy's strict (and if you want optional) python dependecies.
I suggest that you use the
conda package manager to do so, but if you insist you can also use pip.
- 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 dxchangeNote: 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 astropyand
conda install -c dgursoy dxfile edffile spefile netcdf4 olefile
- 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 installfrom 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.
You will also need to build FFTW3 if you do not have it built yet:
NOTE: If building on OS-X make sure you have xcode command line tools installed:
- Download the FFTW 3.3.4 source
- Extract the tar file:
tar xvf fftw-3.3.4.tar.gzand move the source code to you prefered location.
cdinto 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 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
./configure --enable-shared --enable-threads --disable-fortran --enable-sse
--sseoption is for Pentium III+ processors, you may need to use a different option depending on the arquitecture you are running on.
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
Finally lets build TomoPy:
- 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 installor
python setupy.py developif 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 |