[Tutor] Problems with Python Modules

Kent Johnson kent37 at tds.net
Sun Sep 17 13:20:54 CEST 2006


Will Shattuck wrote:
> Hi all,
> 
> I'm trying to install some python mud engines, but I keep running into
> problems with the software not seeing python modules.  Could this be
> due to environment variables missing on my system?  Here is an example
> of the most recent error message using the InnerSpace mud engine:
> 
> ========================================
> C:\muds\InnerSpace-0.9>python bin\bootstrap_server.py --verdir verbs\
> Traceback (most recent call last):
>   File "bin\bootstrap_server.py", line 13, in ?
>     from twisted.scripts import mktap, twistd
>   File "C:\Python24\lib\site-packages\twisted\scripts\twistd.py", line 6, in ?
>     from twisted.python import log, syslog
>   File "C:\Python24\lib\site-packages\twisted\python\syslog.py", line 5, in ?
>     syslog = __import__('syslog')
> ImportError: No module named syslog
> ========================================
> 
> My system is new Dell D620 Latitude running WindowsXP Pro SP2, Python
> 2.4, I have installed the Twisted binary.  

syslog is a Unix module not available on Windows. twisted.python.syslog 
is importing the lib module syslog which is not available.

Are you using a twisted release or did you check it out from Subversion? 
Looking at the history of twistd.py, the import of syslog was only in 
for two days before this was corrected (see 
http://twistedmatrix.com/trac/log/trunk/twisted/scripts/twistd.py). So 
if you are using twisted from SVN you should do a new checkout. If you 
are using a release then you might want to ask about this on the twisted 
mailing list.

I have another mud engine
> (ErisMUD) that doesn't see the SQLite modules I installed either.

What error do you get for this one?

> Here is my PATH at a command prompt in case you need it.  Yes I have a
> lot of crud in my path :)

PATH is not used to search for Python modules, they are searched in 
PYTHONPATH.

Kent



More information about the Tutor mailing list