Installing pySerial

Grant Edwards invalid at invalid
Thu Sep 18 12:11:18 EDT 2008


On 2008-09-18, Joe G (Home) <joe.g at optusnet.com.au> wrote:
> 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

Do you have the win32 modules installed?

> 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

I don't see how you came to that conclusion.  Is the "missing"
module (win32file) located in C:\Python25\Lib\site-packages\serial?

> QUESTION
>=============
> Q1.  How do I add C:\Python25\Lib\site-packages\serial  to the PYTHONPATH ?

Dunno.

> Q2. How do I check that I have installed pySerial corretly
>     (using the Windows installer)

If you used the installer, you almost undoubtedly have it
installed correctly.  I think you're missing the win32 package.

http://python.net/crew/mhammond/win32/Downloads.html

-- 
Grant Edwards                   grante             Yow! I'm not an Iranian!!
                                  at               I voted for Dianne
                               visi.com            Feinstein!!



More information about the Python-list mailing list