Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pip install problem with numpy #141

Closed
oesteban opened this issue Mar 17, 2016 · 11 comments
Closed

pip install problem with numpy #141

oesteban opened this issue Mar 17, 2016 · 11 comments

Comments

@oesteban
Copy link

This error happens with numpy installed. It also happens when building in readthedocs projects having nitime as a requirement and autodocs enabled.

Collecting numpy (from nitime)
  Using cached numpy-1.10.4-cp27-none-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
Collecting nitime
  Downloading nitime-0.6.tar.gz (10.0MB)
    100% |████████████████████████████████| 10.0MB 55kB/s 
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 20, in <module>
      File "/private/var/folders/hw/7bn8tjn96vd58k7sg1ptt82c0000gn/T/pip-build-l6NHiN/nitime/setup.py", line 17, in <module>
        exec(f.read())
      File "<string>", line 2, in <module>
      File "nitime/__init__.py", line 26, in <module>
        from . import algorithms
      File "nitime/algorithms/__init__.py", line 55, in <module>
        from nitime.algorithms.spectral import *
      File "nitime/algorithms/spectral.py", line 10, in <module>
        import numpy as np
    ImportError: No module named numpy

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/hw/7bn8tjn96vd58k7sg1ptt82c0000gn/T/pip-build-l6NHiN/nitime
@arokem
Copy link
Member

arokem commented Mar 17, 2016

This might have to do with a generally out-dated setup file. Let me take a look.

@arokem
Copy link
Member

arokem commented Mar 17, 2016

Could you please show me where this is happening, so that I can easily
replicate?

On Thu, Mar 17, 2016 at 12:01 PM, Oscar Esteban notifications@github.com
wrote:

This error happens with numpy installed. It also happens when building in
readthedocs projects having nitime as a requirement and autodocs enabled.

Collecting numpy (from nitime)
Using cached numpy-1.10.4-cp27-none-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
Collecting nitime
Downloading nitime-0.6.tar.gz (10.0MB)
100% |████████████████████████████████| 10.0MB 55kB/s
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "", line 20, in
File "/private/var/folders/hw/7bn8tjn96vd58k7sg1ptt82c0000gn/T/pip-build-l6NHiN/nitime/setup.py", line 17, in
exec(f.read())
File "", line 2, in
File "nitime/init.py", line 26, in
from . import algorithms
File "nitime/algorithms/init.py", line 55, in
from nitime.algorithms.spectral import *
File "nitime/algorithms/spectral.py", line 10, in
import numpy as np
ImportError: No module named numpy

----------------------------------------

Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/hw/7bn8tjn96vd58k7sg1ptt82c0000gn/T/pip-build-l6NHiN/nitime


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#141

@rwblair
Copy link

rwblair commented Mar 17, 2016

On OS X 10.5 I saw it happen with a fresh python 2.7 virtual env, here are the steps I took:

(rblair@PSY-C02Q70WEFY10) :) (14:45)
~/projects $ virtualenv -p python2.7 .venv/nitime_test
Running virtualenv with interpreter /usr/local/bin/python2.7
New python executable in .venv/nitime_test/bin/python2.7
Also creating executable in .venv/nitime_test/bin/python
Installing setuptools, pip, wheel...done.
(rblair@PSY-C02Q70WEFY10) :) (14:45)
~/projects $ source .venv/nitime_test/bin/activate
(nitime_test)(rblair@PSY-C02Q70WEFY10) :) (14:46)
~/projects $ pip install --no-cache nitime
Collecting nitime
  Downloading nitime-0.6.tar.gz (10.0MB)
    100% |████████████████████████████████| 10.0MB 46.5MB/s 
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 20, in <module>
      File "/private/var/folders/hw/7bn8tjn96vd58k7sg1ptt82c0000gn/T/pip-build-Cya5qp/nitime/setup.py", line 17, in <module>
        exec(f.read())
      File "<string>", line 2, in <module>
      File "nitime/__init__.py", line 26, in <module>
        from . import algorithms
      File "nitime/algorithms/__init__.py", line 55, in <module>
        from nitime.algorithms.spectral import *
      File "nitime/algorithms/spectral.py", line 10, in <module>
        import numpy as np
    ImportError: No module named numpy

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/hw/7bn8tjn96vd58k7sg1ptt82c0000gn/T/pip-build-Cya5qp/nitime
You are using pip version 7.1.2, however version 8.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
(nitime_test)(rblair@PSY-C02Q70WEFY10) :( 1 (14:46)
~/projects $ 

The pip install step does not appear to collect requirements.

Also tested on Debian 8.3 with similar results:

rwblair@afterhours:~$ virtualenv -p python2.7 .venv/nitime_test
Running virtualenv with interpreter /usr/bin/python2.7
New python executable in .venv/nitime_test/bin/python2.7
Also creating executable in .venv/nitime_test/bin/python
Installing setuptools, pip...done.
rwblair@afterhours:~$ source .venv/nitime_test/bin/activate
(nitime_test)rwblair@afterhours:~$ pip install --no-cache nitime
Collecting nitime
  Downloading nitime-0.6.tar.gz (10.0MB)
    100% |████████████████████████████████| 10.0MB 40.3MB/s 
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-Dv7W42/nitime/setup.py", line 17, in <module>
        exec(f.read())
      File "<string>", line 2, in <module>
      File "nitime/__init__.py", line 26, in <module>
        from . import algorithms
      File "nitime/algorithms/__init__.py", line 55, in <module>
        from nitime.algorithms.spectral import *
      File "nitime/algorithms/spectral.py", line 10, in <module>
        import numpy as np
    ImportError: No module named numpy

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-Dv7W42/nitime/
(nitime_test)rwblair@afterhours:~$

Let me know if you need any additional information.

@jimmypeich
Copy link

I just hit the issue and I believe it is related to a "typo" in the version.py that causes some deeper modules to be loaded when reading the version and forcing a dependency on numpy before installing nitime:

from nitime.six.moves import map

Removing the above line should fix the dependency issue ( I believe the standard python map is desired instead)

@arokem
Copy link
Member

arokem commented Mar 18, 2016

Yes -- that makes perfect sense. Importing six from within nitime triggers the numpy import, which can't be completed. I'll take a look at the PR.

@mihaic
Copy link

mihaic commented Dec 13, 2016

@arokem, could you please make a PyPI release that includes the fix for this issue?

@arokem
Copy link
Member

arokem commented Dec 13, 2016

Yes. Will do. Thanks for the reminder.

@arokem
Copy link
Member

arokem commented Dec 15, 2016

OK - @mihaic : I've uploaded 0.7 to pip

(things a bit slow up there, so far only a source tar file, but I am also trying to upload wheels)

@mihaic
Copy link

mihaic commented Dec 16, 2016

Thank you for the release. It really helps our project.

@arokem
Copy link
Member

arokem commented Dec 17, 2016

Out of curiosity, what project is this, and how are you using nitime within it? I never know who is using this (and I am not really doing time-series analysis much these days, hence the relative silence here...). Thanks!

@mihaic
Copy link

mihaic commented Dec 19, 2016

It is an fMRI data simulator:
https://github.com/IntelPNI/brainiak/blob/master/brainiak/utils/fmrisim.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants