I have windows 7 64 bit and Python 3.6
I literally dig entire web for solving this - and nothing works sadly.
AttributeError Traceback (most recent call last)
<ipython-input-150-80ee8bd5f0f2> in <module>()
----> serial.Serial()
AttributeError: module 'serial' has no attribute 'Serial'
I tried solve this by: - checking if my file is named serial.py - reinstalling module - at first, entire module didn't work, now only it's functions. - I can't use any of its features, checking ports don't work, nothing works literally. - I checked my pip - everything is fine, module is in folder site-pacages. - If I execute some code inside pySerial files - it works. But there is no serial.Serial or connecting with COM ports (which I try to do.)
I had the same problem with Python3 3.6.3.1 installed under Cygwin. I replaced 3.6.3.1 with 3.4.5.1 and the script worked again. OK, but not a good long term solution.
Better solution: I reinstalled Python3 3.6.3.1, and then did "pip install pyserial", and then I was able to run my script. No additional modules show up when I do help("modules"), but something extra must have been added to serial.
If you are on a Windows machine using the Windows Subsystem for Linux (WSL), instead of a virtual machine, you will get this error. To fix it, go into powershell
and enter the command:
wsl --shutdown
Restarting powershell
, and running the pyautogui
script again, worked.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With