lilab-bcb/pegasus

ModuleNotFoundError: No module named 'numpy'

slowkow opened this issue · 2 comments

Could I please ask if you know how to work around this issue?

Here's what I did:

git clone git@github.com:klarman-cell-observatory/pegasus.git

cd pegasus

pip install -e .

Here's what I get:

Obtaining file:///home/ks38/work/github.com/klarman-cell-observatory/pegasus
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  ERROR: Command errored out with exit status 1:
   command: /projects/kamil/miniconda3/bin/python /projects/kamil/miniconda3/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmp9ei50s40
       cwd: /home/ks38/work/github.com/klarman-cell-observatory/pegasus
  Complete output (18 lines):
  Traceback (most recent call last):
    File "/projects/kamil/miniconda3/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 280, in <module>
      main()
    File "/projects/kamil/miniconda3/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 263, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "/projects/kamil/miniconda3/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 114, in get_requires_for_build_wheel
      return hook(config_settings)
    File "/tmp/pip-build-env-ggysd_bv/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 150, in get_requires_for_build_wheel
      config_settings, requirements=['wheel'])
    File "/tmp/pip-build-env-ggysd_bv/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 130, in _get_build_requires
      self.run_setup()
    File "/tmp/pip-build-env-ggysd_bv/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 254, in run_setup
      self).run_setup(setup_script=setup_script)
    File "/tmp/pip-build-env-ggysd_bv/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 145, in run_setup
      exec(compile(code, __file__, 'exec'), locals())
    File "setup.py", line 7, in <module>
      import numpy
  ModuleNotFoundError: No module named 'numpy'
  ----------------------------------------
ERROR: Command errored out with exit status 1: /projects/kamil/miniconda3/bin/python /projects/kamil/miniconda3/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmp9ei50s40 Check the logs for full command output.

I continue to get the same error after upgrading numpy:

pip install --upgrade numpy

Requirement already satisfied: numpy in /projects/kamil/miniconda3/lib/python3.7/site-packages (1.18.1)
Collecting numpy
  Downloading numpy-1.19.4-cp37-cp37m-manylinux2010_x86_64.whl (14.5 MB)
     |████████████████████████████████| 14.5 MB 2.3 MB/s
Installing collected packages: numpy
  Attempting uninstall: numpy
    Found existing installation: numpy 1.18.1
    Uninstalling numpy-1.18.1:
      Successfully uninstalled numpy-1.18.1
Successfully installed numpy-1.19.4

Sorry, this issue was entirely my fault.

The cause was a new file I created called pegasus/test-igraph.py.

In that file, I had import numpy as np.

After I deleted pegasus/test-igraph.py, the issue is now resolved.