Hi all.

Sorry if this is really basic, but I've been tearing my hair out searching all over the place. I'm a complete beginner to Python (but not programming in general, I'm more of a C++ man normally).

I am trying to install PySerial on a basic MacPython installation on 10.4. As is suggested by the PySerial website I typed "sudo python setup.py install" and then tried the examples. Python just doesn't seem to believe that PySerial exists. 

I created a simple program just to import PySerial and create a serial instance:

#!/usr/bin/env python
import serial
ser = serial.Serial()

And all I get for my troubles when I type "python serial.py" is:

Traceback (most recent call last):
  File "serial.py", line 10, in ?
    import serial
  File "/Users/myb/Python Serial/serial.py", line 11, in ?
    ser = serial.Serial()
AttributeError: 'module' object has no attribute 'Serial'

From what I have read online I am not sure that installing PySerial has put the right files in the right place. The only PySerial files I can find are in /Library/Python/2.3/site-packages/serial and consists of just these files:

__init__.py     serialjava.py   serialposix.py  serialutil.py   serialwin32.py
__init__.pyc    serialjava.pyc  serialposix.pyc serialutil.pyc  serialwin32.pyc


Have I done something obviously wrong (and probably embarressingly amateur), for example screwing up the install of PySerial? I haven't installed a new version of Python.

Thanks for any help.

Mark Baxter
_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig

Reply via email to