python setup.py install
.
Elena@LAPTOP-9DB5PD27 MINGW64 ~
$ cd Desktop/fabacademy2020/week12/pyserial/
Elena@LAPTOP-9DB5PD27 MINGW64 ~/Desktop/fabacademy2020/week12/pyserial
$ python setup.py install
running install
running bdist_egg
running egg_info
creating pyserial.egg-info
writing pyserial.egg-info\PKG-INFO
writing dependency_links to pyserial.egg-info\dependency_links.txt
writing requirements to pyserial.egg-info\requires.txt
writing top-level names to pyserial.egg-info\top_level.txt
writing manifest file 'pyserial.egg-info\SOURCES.txt'
reading manifest file 'pyserial.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'pyserial.egg-info\SOURCES.txt'
installing library code to build\bdist.win-amd64\egg
running install_lib
running build_py
creating build
creating build\lib
creating build\lib\serial
copying serial\rfc2217.py -> build\lib\serial
copying serial\rs485.py -> build\lib\serial
copying serial\serialcli.py -> build\lib\serial
copying serial\serialjava.py -> build\lib\serial
copying serial\serialposix.py -> build\lib\serial
copying serial\serialutil.py -> build\lib\serial
copying serial\serialwin32.py -> build\lib\serial
copying serial\win32.py -> build\lib\serial
copying serial\__init__.py -> build\lib\serial
creating build\lib\serial\tools
copying serial\tools\hexlify_codec.py -> build\lib\serial\tools
copying serial\tools\list_ports.py -> build\lib\serial\tools
copying serial\tools\list_ports_common.py -> build\lib\serial\tools
copying serial\tools\list_ports_linux.py -> build\lib\serial\tools
copying serial\tools\list_ports_osx.py -> build\lib\serial\tools
copying serial\tools\list_ports_posix.py -> build\lib\serial\tools
copying serial\tools\list_ports_windows.py -> build\lib\serial\tools
copying serial\tools\miniterm.py -> build\lib\serial\tools
copying serial\tools\__init__.py -> build\lib\serial\tools
creating build\lib\serial\urlhandler
copying serial\urlhandler\protocol_alt.py -> build\lib\serial\urlhandler
copying serial\urlhandler\protocol_cp2110.py -> build\lib\serial\urlhandler
copying serial\urlhandler\protocol_hwgrep.py -> build\lib\serial\urlhandler
copying serial\urlhandler\protocol_loop.py -> build\lib\serial\urlhandler
copying serial\urlhandler\protocol_rfc2217.py -> build\lib\serial\urlhandler
copying serial\urlhandler\protocol_socket.py -> build\lib\serial\urlhandler
copying serial\urlhandler\protocol_spy.py -> build\lib\serial\urlhandler
copying serial\urlhandler\__init__.py -> build\lib\serial\urlhandler
creating build\lib\serial\threaded
copying serial\threaded\__init__.py -> build\lib\serial\threaded
creating build\bdist.win-amd64
creating build\bdist.win-amd64\egg
creating build\bdist.win-amd64\egg\serial
copying build\lib\serial\rfc2217.py -> build\bdist.win-amd64\egg\serial
copying build\lib\serial\rs485.py -> build\bdist.win-amd64\egg\serial
copying build\lib\serial\serialcli.py -> build\bdist.win-amd64\egg\serial
copying build\lib\serial\serialjava.py -> build\bdist.win-amd64\egg\serial
copying build\lib\serial\serialposix.py -> build\bdist.win-amd64\egg\serial
copying build\lib\serial\serialutil.py -> build\bdist.win-amd64\egg\serial
copying build\lib\serial\serialwin32.py -> build\bdist.win-amd64\egg\serial
creating build\bdist.win-amd64\egg\serial\threaded
copying build\lib\serial\threaded\__init__.py -> build\bdist.win-amd64\egg\serial\threaded
creating build\bdist.win-amd64\egg\serial\tools
copying build\lib\serial\tools\hexlify_codec.py -> build\bdist.win-amd64\egg\serial\tools
copying build\lib\serial\tools\list_ports.py -> build\bdist.win-amd64\egg\serial\tools
copying build\lib\serial\tools\list_ports_common.py -> build\bdist.win-amd64\egg\serial\tools
copying build\lib\serial\tools\list_ports_linux.py -> build\bdist.win-amd64\egg\serial\tools
copying build\lib\serial\tools\list_ports_osx.py -> build\bdist.win-amd64\egg\serial\tools
copying build\lib\serial\tools\list_ports_posix.py -> build\bdist.win-amd64\egg\serial\tools
copying build\lib\serial\tools\list_ports_windows.py -> build\bdist.win-amd64\egg\serial\tools
copying build\lib\serial\tools\miniterm.py -> build\bdist.win-amd64\egg\serial\tools
copying build\lib\serial\tools\__init__.py -> build\bdist.win-amd64\egg\serial\tools
creating build\bdist.win-amd64\egg\serial\urlhandler
copying build\lib\serial\urlhandler\protocol_alt.py -> build\bdist.win-amd64\egg\serial\urlhandler
copying build\lib\serial\urlhandler\protocol_cp2110.py -> build\bdist.win-amd64\egg\serial\urlhandler
copying build\lib\serial\urlhandler\protocol_hwgrep.py -> build\bdist.win-amd64\egg\serial\urlhandler
copying build\lib\serial\urlhandler\protocol_loop.py -> build\bdist.win-amd64\egg\serial\urlhandler
copying build\lib\serial\urlhandler\protocol_rfc2217.py -> build\bdist.win-amd64\egg\serial\urlhandler
copying build\lib\serial\urlhandler\protocol_socket.py -> build\bdist.win-amd64\egg\serial\urlhandler
copying build\lib\serial\urlhandler\protocol_spy.py -> build\bdist.win-amd64\egg\serial\urlhandler
copying build\lib\serial\urlhandler\__init__.py -> build\bdist.win-amd64\egg\serial\urlhandler
copying build\lib\serial\win32.py -> build\bdist.win-amd64\egg\serial
copying build\lib\serial\__init__.py -> build\bdist.win-amd64\egg\serial
byte-compiling build\bdist.win-amd64\egg\serial\rfc2217.py to rfc2217.cpython-38.pyc
byte-compiling build\bdist.win-amd64\egg\serial\rs485.py to rs485.cpython-38.pyc
byte-compiling build\bdist.win-amd64\egg\serial\serialcli.py to serialcli.cpython-38.pyc
byte-compiling build\bdist.win-amd64\egg\serial\serialjava.py to serialjava.cpython-38.pyc
byte-compiling build\bdist.win-amd64\egg\serial\serialposix.py to serialposix.cpython-38.pyc
byte-compiling build\bdist.win-amd64\egg\serial\serialutil.py to serialutil.cpython-38.pyc
byte-compiling build\bdist.win-amd64\egg\serial\serialwin32.py to serialwin32.cpython-38.pyc
byte-compiling build\bdist.win-amd64\egg\serial\threaded\__init__.py to __init__.cpython-38.pyc
byte-compiling build\bdist.win-amd64\egg\serial\tools\hexlify_codec.py to hexlify_codec.cpython-38.pyc
byte-compiling build\bdist.win-amd64\egg\serial\tools\list_ports.py to list_ports.cpython-38.pyc
byte-compiling build\bdist.win-amd64\egg\serial\tools\list_ports_common.py to list_ports_common.cpython-38.pyc
byte-compiling build\bdist.win-amd64\egg\serial\tools\list_ports_linux.py to list_ports_linux.cpython-38.pyc
byte-compiling build\bdist.win-amd64\egg\serial\tools\list_ports_osx.py to list_ports_osx.cpython-38.pyc
byte-compiling build\bdist.win-amd64\egg\serial\tools\list_ports_posix.py to list_ports_posix.cpython-38.pyc
byte-compiling build\bdist.win-amd64\egg\serial\tools\list_ports_windows.py to list_ports_windows.cpython-38.pyc
byte-compiling build\bdist.win-amd64\egg\serial\tools\miniterm.py to miniterm.cpython-38.pyc
byte-compiling build\bdist.win-amd64\egg\serial\tools\__init__.py to __init__.cpython-38.pyc
byte-compiling build\bdist.win-amd64\egg\serial\urlhandler\protocol_alt.py to protocol_alt.cpython-38.pyc
byte-compiling build\bdist.win-amd64\egg\serial\urlhandler\protocol_cp2110.py to protocol_cp2110.cpython-38.pyc
byte-compiling build\bdist.win-amd64\egg\serial\urlhandler\protocol_hwgrep.py to protocol_hwgrep.cpython-38.pyc
byte-compiling build\bdist.win-amd64\egg\serial\urlhandler\protocol_loop.py to protocol_loop.cpython-38.pyc
byte-compiling build\bdist.win-amd64\egg\serial\urlhandler\protocol_rfc2217.py to protocol_rfc2217.cpython-38.pyc
byte-compiling build\bdist.win-amd64\egg\serial\urlhandler\protocol_socket.py to protocol_socket.cpython-38.pyc
byte-compiling build\bdist.win-amd64\egg\serial\urlhandler\protocol_spy.py to protocol_spy.cpython-38.pyc
byte-compiling build\bdist.win-amd64\egg\serial\urlhandler\__init__.py to __init__.cpython-38.pyc
byte-compiling build\bdist.win-amd64\egg\serial\win32.py to win32.cpython-38.pyc
byte-compiling build\bdist.win-amd64\egg\serial\__init__.py to __init__.cpython-38.pyc
creating build\bdist.win-amd64\egg\EGG-INFO
installing scripts to build\bdist.win-amd64\egg\EGG-INFO\scripts
running install_scripts
running build_scripts
creating build\scripts-3.8
copying and adjusting serial\tools\miniterm.py -> build\scripts-3.8
creating build\bdist.win-amd64\egg\EGG-INFO\scripts
copying build\scripts-3.8\miniterm.py -> build\bdist.win-amd64\egg\EGG-INFO\scripts
copying pyserial.egg-info\PKG-INFO -> build\bdist.win-amd64\egg\EGG-INFO
copying pyserial.egg-info\SOURCES.txt -> build\bdist.win-amd64\egg\EGG-INFO
copying pyserial.egg-info\dependency_links.txt -> build\bdist.win-amd64\egg\EGG-INFO
copying pyserial.egg-info\requires.txt -> build\bdist.win-amd64\egg\EGG-INFO
copying pyserial.egg-info\top_level.txt -> build\bdist.win-amd64\egg\EGG-INFO
zip_safe flag not set; analyzing archive contents...
creating dist
creating 'dist\pyserial-3.4.1-py3.8.egg' and adding 'build\bdist.win-amd64\egg' to it
removing 'build\bdist.win-amd64\egg' (and everything under it)
Processing pyserial-3.4.1-py3.8.egg
Copying pyserial-3.4.1-py3.8.egg to c:\users\39345\appdata\local\programs\python\python38\lib\site-packages
Adding pyserial 3.4.1 to easy-install.pth file
Installing miniterm.py script to C:\Users\39345\AppData\Local\Programs\Python\Python38\Scripts
Installed c:\users\39345\appdata\local\programs\python\python38\lib\site-packages\pyserial-3.4.1-py3.8.egg
Processing dependencies for pyserial==3.4.1
Finished processing dependencies for pyserial==3.4.1
Elena@LAPTOP-9DB5PD27 MINGW64 ~/Desktop/fabacademy2020/week12/pyserial
$
python file_name.py
, an error appeared saying that I couldn't have access to the port.
$ python arduino_interface.py
Traceback (most recent call last):
File "arduino_interface.py", line 12, in
arduinoData = serial.Serial(serialPort, baudRate)
File "C:\Users\39345\AppData\Local\Programs\Python\Python38\lib\site-packages\pyserial-3.4.1-py3.8.egg\serial\serialwin32.py", line 33, in __init__
File "C:\Users\39345\AppData\Local\Programs\Python\Python38\lib\site-packages\pyserial-3.4.1-py3.8.egg\serial\serialutil.py", line 242, in __init__
File "C:\Users\39345\AppData\Local\Programs\Python\Python38\lib\site-packages\pyserial-3.4.1-py3.8.egg\serial\serialwin32.py", line 64, in open
serial.serialutil.SerialException: could not open port 'COM3': PermissionError(13, 'Access is denied.', None, 5)
"Run as Administrator"
.My error was not only having left open the Arduino IDE window (you must close it before running the python file), but I also had an error in the python code (I was opening the Serial port twice).
After having correct all the mistakes, I run the python file again and everything went fine.
Here's the result: