Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Numpy import error "ImportError: Something is wrong with the numpy installation."

Traceback (most recent call last):
  File "extract_C3D_feature.py", line 7, in <module>
    import numpy as np
  File "/usr/local/lib/python2.7/dist-packages/numpy/__init__.py", line 142, in <module>
    from . import core
  File "/usr/local/lib/python2.7/dist-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 ['/usr/local/lib/python2.7/dist-packages/numpy']. One method of fixing this is to repeatedly uninstall numpy until none is found, then reinstall this version.

i tried to uninstall and install but maybe i'm missing something

like image 455
cervantez Avatar asked Oct 20 '25 18:10

cervantez


1 Answers

Try sudo pip uninstall numpy repeatedly until you purge all numpy versions. Replace pip by pip3 if you use python3.

If that also didn't work, It seems python is looking for numpy packages not numpy installations. Following the advice from the error handler in bash and uninstalling numpy won't remove the error because python can still see the uninstalled packages. If these versions of numpy are needed for some other application, for the time being, just move them onto your desktop where python can't find them. This should resolve the error.

You may need to use 'pip3 install numpy' when using python3.

Hope this helps.

like image 106
Nandu Raj Avatar answered Oct 22 '25 07:10

Nandu Raj



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!