OH, I'm A Lumberjack And I'm OK...

Robin Dunn robin at alldunn.com
Fri Sep 3 01:57:45 EDT 1999


>
> PATHS     (yes, I took the suggestion to place my Python & related files
in
> pathways that have no spaces)
>
> Path to Python executable: C:\Python
> Path to Tcl executable: C:\Tcl\bin
> Path to PIL: C:\Python\PIL
> Path to Tkinter: C:\Python\Lib\lib-tk
> Path to Painter (a program that I am more than curious to see work, I am
almost
> obsessed now): C:\Python\scripts\painter.py
>
> My Traceback (error message):
>
> >>> Traceback (innermost last):
>   File "C:\Python\Pythonwin\pywin\framework\scriptutils.py", line 237, in
> RunScript
>     exec codeObject in __main__.__dict__
>   File "C:\Python\scripts\painter.py", line 12, in ?
>     import Image, ImageTk
> ImportError: No module named Image
>
> My Autoexec.bat settings:
>
> PATH=C:\WINDOWS;C:\WINDOWS\COMMAND;C:\WINDOWS;
> set PATH=%PATH%C:\mingw32\bin;
> set PATH=%PATH%C:\PYTHON;C:\PYTHON\PIL;C:\TCL\BIN;C:\PYTHON\LIB\LIB-TK;
>

It can't find the module because it's not on the PYTHONPATH.  Execute this
python code to see what directories are in your PYTHONPATH:

import sys
print sys.path


To fix it add this to your autoexec.bat:

set PYTHONPATH=c:\Python\PIL

or add the directory to the value in the Registry at

HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\1.5\PythonPath

or as a subkey.


--
Robin Dunn
Software Craftsman
robin at AllDunn.com
http://AllDunn.com/robin/
http://AllDunn.com/wxPython/  Check it out!







More information about the Python-list mailing list