Skip to content

Ubuntu no module pyserial #3295

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ghost opened this issue Sep 28, 2019 · 5 comments
Closed

Ubuntu no module pyserial #3295

ghost opened this issue Sep 28, 2019 · 5 comments

Comments

@ghost
Copy link

ghost commented Sep 28, 2019

OS: 4.18.0-25-generic #26~18.04.1-Ubuntu
IDE: Arduino 1.8.9

Ubuntu Fresh installed

 python -m pip install pyserial
...
You are using pip version 10.0.1, however version 19.2.3 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
 gone wit it

Then

pip install pyserial
Traceback (most recent call last):
  File "/home/marius/.local/bin/pip", line 7, in <module>
    from pip._internal import main
ModuleNotFoundError: No module named 'pip._internal'

Then

marius@pegpc:~$ python3 -m pip install pyserial
Collecting pyserial
  Using cached https://files.pythonhosted.org/packages/0d/e4/2a744dd9e3be04a0c0907414e2a01a7c88bb3915cbe3c8cc06e209f59c30/pyserial-3.4-py2.py3-none-any.whl
Installing collected packages: pyserial
Successfully installed pyserial-3.4

Then edit esptool.py and did

#!/usr/bin/env python3
#
#

Still the error persists


Traceback (most recent call last):
  File "/home/marius/.arduino15/packages/esp32/tools/esptool_py/2.6.1/esptool.py", line 39, in <module>
    import serial
ImportError: No module named serial
exit status 1
Error compiling for board ESP32 Wrover Module.
@lbernstone
Copy link
Contributor

Shebang is a hint- the app calling the script does not necessarily respect that. Did you try installing through apt? sudo apt install python-serial

@ghost
Copy link
Author

ghost commented Sep 29, 2019

Resolved.

@ghost ghost closed this as completed Sep 29, 2019
@Kyungje-cho
Copy link

how to solved this problem ??

@hary66
Copy link

hary66 commented Nov 25, 2020

It would have been nice to tell us how you solved this issue !

@wrmthorne
Copy link

wrmthorne commented Apr 5, 2021

For anyone else coming here, I tried everything in this thread which didn't work for me but the command above (instead for python3) fixed it:

sudo apt install python3-serial

Worked for me on Ubuntu 20.0.4

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants