Installing pySerial
Joe G (Home)
joe.g at optusnet.com.au
Thu Sep 18 11:47:45 EDT 2008
Hi All,
Background
===================
I have installed Python for windows today from the python web site .I also
installed pySerial using the Windows installer from the sourceforge web
site..... Both installs use the default directories.
Phyton version : Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC
v.1310 32 bit (Intel)] on win32
pySerial 2.4 July 6th
Problem : Errors Screen output
============================
>>> import serial
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
import serial
File "C:\Python25\Lib\site-packages\serial\__init__.py", line 18, in
<module>
from serialwin32 import *
File "C:\Python25\Lib\site-packages\serial\serialwin32.py", line 9, in
<module>
import win32file # The base COM port and file IO functions.
ImportError: No module named win32file
>>>
So it looks like Python can not see some of the modules
Here's the active paths
>>> print sys.path
['C:\\Python25\\Lib\\idlelib', 'C:\\WINDOWS\\system32\\python25.zip',
'C:\\Python25\\DLLs', 'C:\\Python25\\lib', 'C:\\Python25\\lib\\plat-win',
'C:\\Python25\\lib\\lib-tk', 'C:\\Python25',
'C:\\Python25\\lib\\site-packages']
>>>
It seems that C:\Python25\Lib\site-packages\serial needs to be added to
the PYTHONPATH
QUESTION
=============
Q1. How do I add C:\Python25\Lib\site-packages\serial to the PYTHONPATH ?
Q2. How do I check that I have installed pySerial corretly (using the
Windows installer)
Thanks in advance
Joe
More information about the Python-list
mailing list