PyPI: | ||
Help! |
Installation¶
Requirements¶
The following dependencies are needed to run the code (as-written). Some of
these could be pretty easily removed, but the code was written with my research
results in mind, and as such, has some dependencies that make things match
my personal preferences (such as seaborn
). Some details on installing them
are given below:
Package | Source | PyPI |
---|---|---|
numpy |
Source | PyPI |
matplotlib |
Source | PyPI |
libtiff |
Source | N/A |
pylibtiff |
Source, Python 3 port | PyPI |
scikit-fmm |
Source | PyPI |
seaborn |
Source | PyPI |
hyperspy (optional) |
Source | PyPI |
Python 2.7¶
To get a full set-up on Python 2.7 (hopefully) pretty easily, run the following:
$ pip install numpy matplotlib libtiff scikit-fmm seaborn fibtortuosity hyperspy
Python 3.5¶
On Python 3.5, things are a little bit trickier because one of the
dependencies (libtiff
) has not yet been ported to Python 3.
I have done my best to port this package myself (currently awaiting
inclusion into the main libtiff
package). I cannot guarantee it
will work, but it seems alright on my machine. To install my fork, open up a
command line and run the following:
$ git clone https://github.com/jat255/pylibtiff.git
$ cd pylibtiff
$ git checkout ENH_py3_upgrade
$ pip install .
This library depends on a compiled version of the tiff
library as well.
On a linux system (like Ubuntu) this library is probably available in the
package repository, and can be installed with the following:
$ sudo apt-get install libtiff5 libtiff5-dev
On Windows, things are just a little bit harder. I was able to get it built on my Windows box by follow the instructions here.
- Some tips:
- Make sure to compile the version (32 or 64 bit) that matches your Python installation
- This page will explain how to get the Visual C++ compiler to work on the command line
- Once you have compiled the
libtiff.dll
file, add the directory containing it to your system path, and then restart any Python environments you have open. The library should now be available…
Once all that is done, run the same code as for 2.7, but take out libtiff from the pip
list.
“Stable” Version¶
Although it shouldn’t really be considered stable, there are released versions
available for installation through pip
on
PyPI.
Note
Note: due to some recent bugs with PyPI, the package will likely
not show up if you use pip search
, but should install as
normal with pip install
.
To install the latest release:
$ pip install --user fibtortuosity
Development Version¶
The latest version of the code should be available in the Bitbucket
repository.
To get this version installed on your system, clone the repository,
and then install with pip
:
$ git clone https://bitbucket.org/jat255/fibtortuosity.git
$ cd fibtortuosity
$ pip install -e ./