Closed tseemann closed 9 years ago
Last time Bernie checked pip didn't play nicely with scipy in this regard, hence need to install scipy first. This is clarified in the install instructions.
This is how I installed it in the end:
% virtualenv /bio/sw/srst2 % /bio/sw/srst2/bin/pip install numpy % /bio/sw/srst2/bin/pip install scipy % git clone https://github.com/katholt/srst2.git % /bio/sw/srst2/bin/pip install srst2/ % /bio/sw/srst2/bin/srst2 usage: srst2 [-h] [--version] [--input_se INPUT_SE [INPUT_SE ...]]
I haven't actually ran it on anything yet. A couple of example command lines at the bottom of the help output would be great here, along with a URL for the manual.
The problem with installing scipy and numpy with pip persists.
The problem is that they have dependencies on external libraries such as BLAS which are not always installed on people's computers. Pip does not install them for you.
I checked on tseemann's machine and he happens to have BLAS installed in a standard path, which is probably why it worked for him.
However, if you try to pip install scipy on a machine without BLAS in a standard location then it will fail.
I'm not sure if there is a good solution for this other than telling users to install numpy and scipy separately before installing srst2.
I will investigate whether we can make the "pip install srst2" give a better error message if numpy and scipy are not installed.
Explicitly added numpy to dependency list
I did a "pip install srst2/" from a git clone, using virtualenv (blank python canvas):
File "/bio/sw/srst2/local/lib/python2.7/site-packages/srst2/srst2.py", line 19, in
from scipy.stats import binom_test, linregress
ImportError: No module named scipy.stats
I then try to install scipy via PIP, but fails due to lack of numpy.
Once I install numpy, then scipy works, and srst2 works (well, i get the help screen).
I think the PIP file needs to have its dependencies listed in it somehow?