[SciPy-user] SciPy autotester fails on pilutil

josef.pktd@gmai... josef.pktd@gmai...
Wed May 6 17:30:56 CDT 2009


On Wed, May 6, 2009 at 6:01 PM, Robert Kern <robert.kern@gmail.com> wrote:
> On Wed, May 6, 2009 at 17:51,  <josef.pktd@gmail.com> wrote:
>> On Wed, May 6, 2009 at 5:07 PM, Christopher Barker
>> <Chris.Barker@noaa.gov> wrote:
>>> josef.pktd@gmail.com wrote:
>>>> When I installed PIL, it added the file PIL.pth to the sitepackages
>>>> directory, which adds the pil directory to the python path, and so
>>>> ``import Image`` works in the standard install (I'm on Windows).
>>>>
>>>> Can you check if you have a PIL.pth? the content is just the word PIL
>>>> unless it works differently with your operating system.
>>>
>>> FWIW, I think "import Image" is deprecated, in favor of "from PIL import
>>> Image", which removes the need for the pth file. The PIL packge has a
>>> LOT of stuff in it, you really don't want all of it on your sys.path.
>>>
>>>
>>> "Namespaces are one honking great idea -- let's do more of those!"
>>>
>>> (which isn't an exact fit to the topic at hand, but it's close)
>>>
>>
>> +1
>> When I looked this up, I also found a numpy.pth in sitepackages, but I
>> don't know which installer put it there, or if I put it there myself.
>> Is numpy.pth necessary for anything?
>
> What's inside it?
>

just     ``numpy``

so I can do

>>> import add_newdocs
>>> add_newdocs.__file__
'C:\\Programs\\Python25\\lib\\site-packages\\numpy\\add_newdocs.pyc'

Just to verify, I reinstalled
numpy-1.3.0-win32-superpack-python2.5.exe and it didn't add a
numpy.pth file.
Either it was from an earlier installer or when I installed my own build.

So, I deleted numpy.pth.

Josef


More information about the SciPy-user mailing list