I'm using python 2.7 on Linux CentOS 6.5. After successfully using yum
to install numpy
, I am unable to import the module.
from numpy import *
The above code produces the following error:
no module named numpy
Why does this happen?
I'm using python 2.7 on Linux CentOS 6.5. After successfully using yum
to install numpy
, I am unable to import the module.
from numpy import *
The above code produces the following error:
no module named numpy
Why does this happen?
Cent OS will have default version of Python 2.6.6 and you might have configured python 2.7 may be at /usr/local/lib.
Yum Install will install package in site-package directory of 2.6 please check /usr/lib/python2.6/site-packages, if numpy package folder is present then you have to either install numpy for python 2.7 using tarball and run setup.py.
The other hack could be copy numpy directory from 2.6 version's site-packages to 2.7 version's site-package.