On Wed, Apr 16, 2014 at 12:56 PM, J W Burton <jahree1...@gmail.com> wrote:
> I have installed both Python 2.7 AND Python 3.3 and the corresponding 
> pyserial files from
>
> ihttps://pypi.python.org/packages/any/p/pyserial/pyserial-2.7.win32.exe#md5=21555387937eeb79126cde25abee4b35n
>  my
>
> for 2.7
>
> When I look in my Python27/Lib/site-packages/serial folder I see
> package files
>
> but when I run a program using import serial, I get an error
>  Traceback (most recent call last):
>   File "C:\Users\Jahree\serial.py", line 2, in <module>
>     import serial
>   File "C:\Users\Jahree\serial.py", line 5, in <module>
>     ser = serial.Serial(
> AttributeError: 'module' object has no attribute 'Serial'
>
> I'm guessing there is a path not set correctly - I'M STUCK
>
> Please help.
>
> Thanks
>
> ps: the following is serial.py file I'm using for testing.
>
> import time
> import serial

Your file is named serial.py, so "import serial" in that file will try
to import itself.  You can see this in the traceback you posted,
everything is coming from "C:\Users\Jahree\serial.py".  Rename your
serial.py and things should work as expected.

Hope this helps,
-- 
Zach
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to