You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RuntimeError: module compiled against API version 0xc but this version of numpy is 0xb
Traceback (most recent call last):
File "brazil.py", line 3, in
from mpl_toolkits.basemap import Basemap
File "/usr/local/lib/python2.7/dist-packages/mpl_toolkits/basemap/init.py", line 37, in
import _geoslib
ImportError: numpy.core.multiarray failed to import
The text was updated successfully, but these errors were encountered:
Could you provide some more information about your working environment? This would mean:
Operating system.
Python version (I guess 2.7).
Channel used to install things (e.g. PyPI, Anaconda, GNU/Linux repositories).
If you are using either Windows or GNU/Linux, I would recommend you to install basemap using pip. Since version 1.3.0 we provide precompiled binary wheels and it is as simple as doing:
python -m pip install basemap
In case you need the high-resolution auxiliary datasets, you would have to install them manually:
I am closing this issue due to lack of feedback. From your traceback
RuntimeError: module compiled against API version 0xc but this version of numpy is 0xb
this is the typical problem that occurs when you build basemap using a newer numpy version (e.g. >= 1.20) but later run it with an elder numpy version (e.g. < 1.20). There has been effort in remediating this issue by creating GitHub Actions that generate precompiled binary wheels for different platforms (in your case it looks like GNU/Linux).
I would just recommend you install the precompiled wheels from PyPI if you cannot (or do not want to) build from source. In addition, the basemap repository now contains a pyproject.toml file with the proper definition of the build dependencies, so this problem should not be appearing anymore.
RuntimeError: module compiled against API version 0xc but this version of numpy is 0xb
Traceback (most recent call last):
File "brazil.py", line 3, in
from mpl_toolkits.basemap import Basemap
File "/usr/local/lib/python2.7/dist-packages/mpl_toolkits/basemap/init.py", line 37, in
import _geoslib
ImportError: numpy.core.multiarray failed to import
The text was updated successfully, but these errors were encountered: