Skip to content

module compiled against API version 8 but this version of numpy is 7 #3471

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

Closed
nitraat opened this issue Apr 27, 2013 · 8 comments
Closed

module compiled against API version 8 but this version of numpy is 7 #3471

nitraat opened this issue Apr 27, 2013 · 8 comments
Labels
Build Library building on various platforms

Comments

@nitraat
Copy link

nitraat commented Apr 27, 2013

After upgrading to pandas 0.11.0 using pip, I get the following errors:

In [1]: import pandas
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
RuntimeError: module compiled against API version 8 but this version of numpy is 7
numpy.core.multiarray failed to import
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-1-d6ac987968b6> in <module>()
----> 1 import pandas

/usr/local/lib/python2.7/site-packages/pandas/__init__.py in <module>()
      4 
      5 try:
----> 6     from . import hashtable, tslib, lib
      7 except Exception:  # pragma: no cover
      8     import sys

ImportError: numpy.core.multiarray failed to import

I have numpy version 1.7.1, running OS X 10.8.3
Installing pandas on an empty virtualenv failed due to a numpy dependency which couldn't install automatically, however, after installing numpy explicitly, it did work. Is this a bug or is something just messed up with my install?

@ghost
Copy link

ghost commented Apr 27, 2013

0.11.0 now imports numexpr if it's available, try reinstalling/recompiling that
against your current numpy and see if the error goes away.

@nitraat
Copy link
Author

nitraat commented Apr 27, 2013

Reinstalled numexpr, which imports fine on its own, but the problem still persists.

@ghost
Copy link

ghost commented Apr 27, 2013

Can you elaborate on "failed due to a numpy dependency which couldn't install automatically",
what went wrong?

@ghost
Copy link

ghost commented Apr 29, 2013

I would guess you compiled numpy from git master, without resetting to the 1.7 maintenance branch.
try "git reset --hard v1.7.1" , reinstall numpy, and pandas and hopefully the issue will be resolved.

@nitraat
Copy link
Author

nitraat commented Apr 29, 2013

Can you elaborate on "failed due to a numpy dependency which couldn't install automatically",
what went wrong?

When I used pip install pandas, it tried to install numpy as well since it's a dependency, however, that build seemed to fail. When I subsequently issued pip install numpy, numpy did install correctly. I unfortunately lost the pip.log, though I can probably reproduce it if needed.

I would guess you compiled numpy from git master, without resetting to the 1.7 maintenance branch.
try "git reset --hard v1.7.1" , reinstall numpy, and pandas and hopefully the issue will be resolved.

This fixed the problem. Thanks a bunch!

@nitraat nitraat closed this as completed Apr 29, 2013
@vfilimonov
Copy link
Contributor

I have the same issue. Both installations of numpy with pip install numpy and git clone https://github.com/numpy/numpy.git (together with git reset --hard v1.7.1 and then build/install) do not help - on import pandas I get the same error as the topic starter.

OSX 10.8.3
numpy: 1.7.1
python: 2.7.2
pandas: 0.11.0 (installed with pip)

I would appreciate any help with this.

@ghost
Copy link

ghost commented May 10, 2013

can you try that in a venv and see if it makes a difference? it's hard to tell
what goes on in the global site-packages sometime.

@vfilimonov
Copy link
Contributor

It was within some virtualenv, but it seemed that quite messy one.
Within a clean virtualenv everything worked perfectly! y-p, thank you very much for the advice!

p.s. I installed packages in the following order:

pip install numpy
pip install scipy
pip install pandas

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

No branches or pull requests

2 participants