[SciPy-dev] NumPy import problem.
oliphant.travis at ieee.org
Fri Jan 6 16:22:40 CST 2006
Fernando Perez wrote:
>Robert Kern wrote:
>>Charles R Harris wrote:
>>>On 1/6/06, *Robert Kern* <robert.kern at gmail.com
>>><mailto:robert.kern at gmail.com>> wrote:
>>> Charles R Harris wrote:
>>> > If I try to import numpy from python in my home directory I get the
>>> > following error
>>> Do you have a module named "new" in your home directory?
>>>Why, yes I did. I renamed it and things work fine now. I deduce that
>>>this problem has been seen before?
>>We've seen something similar once or twice before. When I get an error that says
>>some module doesn't have suchAndSuch attribute that really ought to be there, I
>>always check to make sure that the module I think is being imported is the
>>module that is actually being imported. The "new" module is somewhat notorious
>>for this kind of error.
>This is precisely why pep-328, which I recently mentioned, is going to be at
>some point enforced. I've also been bitten more than once by this.
This wouldn't really fix this problem, though because if $HOME is still
on your sys.path then the module would be picked up from there anyway,
Regarding PEP-328, my understanding is that the -dot- notation needed
for sub-packages only works in Python 2.4, so we can't use it now unless
we drop support for Python 2.3 (or play ugly games with version
checking...) which I don't think we should until PEP-328 actually does
More information about the Scipy-dev