snayfach / MicrobeCensus

MicrobeCensus estimates the average genome size of microbial communities from metagenomic data
http://genomebiology.com/2015/16/1/51
GNU General Public License v3.0
41 stars 16 forks source link

Installation on a cluster redux #17

Closed sturne29 closed 6 years ago

sturne29 commented 6 years ago

I reviewed the closed issue regarding installing on a cluster, but unfortunately it didn't help me much. I'm having the same issue: although the numpy package is installed in a folder that is in my my $PYTHONPATH, I still get the

Could not import module 'numpy'

error.

I don't have pip available on my cluster, so I used python setup.py install --user, which seemed to work. I then followed Thomieh73's advice, but I'm still getting the numpy error. Any help? I'm trying to use the tool to analyze a bunch of large files and I don't have the space to do it on my home machine, even though it runs it fine.

Thanks in advance.

UPDATE: Turns out we do have pip, but I can't install via pip because it requires administrator privileges (which I don't have), so I can't use that option.

snayfach commented 6 years ago

You should be able to use pip install numpy --user. And then add the pip installation directory to your pythonpath where ever that is. After that you should be able to import numpy from within python: $ python
> import numpy

sturne29 commented 6 years ago

I really appreciate the response; thank you so much!

I followed your advice, but when I run pip install numpy --user, I get the following:

Requirement already satisfied (use --upgrade to upgrade): numpy in /export/share/tools/numpy-1.11.1-python-2.7.6-intel/lib/python2.7/site-packages

(I don't know if this matters, but for reference: the cluster I'm working on has a large number of modules, and there are several numpy modules. Even if I load one (or more), I still get the "Could not import module "numpy"" error.)

snayfach commented 6 years ago

Make sure that path is appended to your PYTHONPATH and you should be good to go:

export PYTHONPATH=$PYTHONPATH:/export/share/tools/numpy-1.11.1-python-2.7.6-intel/lib/python2.7/site-packages

sturne29 commented 6 years ago

I still get the same error, unfortunately.

I also created a local install of numpy and added that to my PYTHONPATH, and still it can't import it. As far as I know, it installed without any errors, so I'm pretty lost.

snayfach commented 6 years ago

If you are unable to install a dependency then I would try and get help from your system admin. This doesn't appear to be an issue related to the software. Good luck!

sturne29 commented 6 years ago

Thanks for the input! I did contact them before opening the issue, but was hoping to be able to solve it myself (because it can take a while.) In any case, I really appreciate your help.