[SciPy-user] Question about Eggs and easy_install

David Cournapeau david@ar.media.kyoto-u.ac...
Thu Dec 6 22:06:54 CST 2007


Prabhu Ramachandran wrote:
> Lorenzo Isella wrote:
>   
>> In [1]: import numpy
>>
>> In [2]: print numpy.__file__
>> /usr/lib/python2.4/site-packages/numpy-1.0.4-py2.4-linux-i686.egg/numpy/__init__.pyc
>>     
>
> It looks like your numpy has been upgraded.  One way to undo this is to do:
>
>   easy_install -m numpy
>
> and then:
>
> rm -rf /usr/lib/python2.4/site-packages/numpy-1.0.4-py2.4-linux-i686.egg
>
>
> This should hopefully revert back to your debian version of numpy.  If 
> it doesn't do an apt-get install --reinstall python-numpy to reinstall 
> the debian version.
>
>   
The whole problem is coming from the fact that Lorenzo installed things 
in /usr. To keep things simple: never ever do that. For example, if you 
install numpy from debian, and then overwrite with your own numpy, it is 
possible that you won't be able to remove the package (the scripts to 
remove the packages may rely on some behaviour which is different 
between the packaged numpy and your own). dpkg won't overwrite, though, 
because by default, it fails if a package tries to overwrite any 
existing file, but that does not make it a good idea.

The only reliable way to have dpkg-aware numpy and your own is to 
install your own in a different place. Doing otherwise is really likely 
to give you some headache at some points.

cheers,

David


More information about the SciPy-user mailing list