bioinfo-ut / PhenotypeSeeker

Identify phenotype-specific k-mers and predict phenotype using sequenced bacterial strains
GNU General Public License v3.0
18 stars 10 forks source link

Cogent install error #5

Closed duceppemo closed 5 years ago

duceppemo commented 5 years ago

I'm trying to install PhenotypeSeeker, but getting errors on install:

conda create -n PhenotypeSeeker python=2.7
git clone https://github.com/bioinfo-ut/PhenotypeSeeker.git
cd PhenotypeSeeker
sh local_install.sh

I get the following error:

    ERROR: Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-XeBuK4/cogent/setup.py", line 26, in <module>
        raise RuntimeError("Numpy required but not found.")
    RuntimeError: Numpy required but not found.

But numpy installs correctly:

Collecting numpy
  Using cached https://files.pythonhosted.org/packages/1f/c7/198496417c9c2f6226616cff7dedf2115a4f4d0276613bab842ec8ac1e23/numpy-1.16.4-cp27-cp27mu-manylinux1_x86_64.whl
ERROR: genomicconsensus 2.2.2 requires ConsensusCore==1.0.2, which is not installed.
Installing collected packages: numpy
Successfully installed numpy-1.16.4

I'm on Ubuntu 18. Any idea why the installation fails?

duceppemo commented 5 years ago

It works now. It seems that one of the problem was that I had older versions of nympy installed on my system.

>>> import cogent
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/bioinfo/miniconda3/envs/PhenotypeSeeker/lib/python2.7/site-packages/cogent-1.9-py2.7-linux-x86_64.egg/cogent/__init__.py", line 5, in <module>
  File "/home/bioinfo/.local/lib/python2.7/site-packages/numpy/__init__.py", line 142, in <module>
    from . import core
  File "/home/bioinfo/.local/lib/python2.7/site-packages/numpy/core/__init__.py", line 91, in <module>
    raise ImportError(msg.format(path))
ImportError: Something is wrong with the numpy installation. While importing we detected an older version of numpy in ['/home/bioinfo/.local/lib/python2.7/site-packages/numpy']. One method of fixing this is to repeatedly uninstall numpy until none is found, then reinstall this version.

Uninstalling all numpy versions et reinstalling didn't solve the problem though. What ended working was to replace pip2.7 install --user . by python2.7 setup.py install --user. Calling phenotypeseeker would still get me an error, but it wasn't from cogent anymore:

Traceback (most recent call last):
  File "/home/bioinfo/.local/bin/phenotypeseeker", line 4, in <module>
    __import__('pkg_resources').run_script('PhenotypeSeeker==0.4.0', 'phenotypeseeker')
  File "/home/bioinfo/miniconda3/envs/PhenotypeSeeker/lib/python2.7/site-packages/pkg_resources/__init__.py", line 666, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/home/bioinfo/miniconda3/envs/PhenotypeSeeker/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1444, in run_script
    .format(**locals()),
pkg_resources.ResolutionError: Script 'scripts/phenotypeseeker' not found in metadata at '/home/bioinfo/.local/lib/python2.7/site-packages/PhenotypeSeeker-0.4.0.dist-info'

All I had to do was to copy manually the script folder at the requested location. The --version argument works. Now I can try the program for once.

erkiaun commented 5 years ago

Unfortunately I was unable to reproduce these errors. Both, install.sh and local_install.sh worked on clean Ubuntu install.