[Numpy-discussion] Problems with numpy

Benjamin Root ben.root@ou....
Thu Feb 24 10:25:20 CST 2011


On Thu, Feb 24, 2011 at 10:04 AM, Mustapha BOUIKHIF <
mustapha.bouikhif@idris.fr> wrote:

> Hello all,
>
> I am having problems with numpy (version 1.5.1)
>
> when executing this command as root, evry thing is OK:
> python -Wd -c 'import numpy; numpy.test()'
>
> Running unit tests for numpy
> NumPy version 1.5.1
> NumPy is installed in /usr/local/lib64/python2.6/site-packages/numpy
> Python version 2.6 (r26:66714, Nov  9 2010, 01:31:57) [GCC 4.3.4
> [gcc-4_3-branch revision 152973]]
> nose version 1.0.0
>
> ......................
> Ran 3006 tests in 14.088s
>
> OK (KNOWNFAIL=4)
>
> But as a normal user (non root), the same command show errors:
>
> python -Wd -c 'import numpy; numpy.test()'
> Traceback (most recent call last):
>   File "<string>", line 1, in <module>
>   File "/usr/local/lib64/python2.6/site-packages/numpy/__init__.py",
> line 127, in <module>
>     raise ImportError(msg)
> ImportError: Error importing numpy: you should not try to import numpy
> from its source directory; please exit the numpy source tree, and
> relaunch your python intepreter from there.
>
>
> Python 2.6
> Linux  <machine> 2.6.32.27-0.2-default  x86_64 x86_64 x86_64 GNU/Linux
> modules are in /usr/local/lib64/python2.6/site-packages/
>
> Any help will be appreciated.
>
>
>
Mustapha,

"ImportError: Error importing numpy: you should not try to import numpy
from its source directory; please exit the numpy source tree, and
relaunch your python intepreter from there."

It is generally a bad idea to import installed modules directly from their
source directory.  Just change your working directory to another location
where "numpy" is not a directory, and you should be able to run the tests.

Ben Root
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20110224/b6cc944f/attachment.html 


More information about the NumPy-Discussion mailing list