-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
ImportError: No module named serial.tools.list_ports (ESPTOOL-249) #350
Comments
I got the same issue. I am running on macOS 10.13.6. Esptool installed with the esp32 core and works fine when flashing the esp32 through Arduino IDE. When trying to flash tasmota firmware to an esp8266, I get the same error. Python 2.7 and 3.7 installed. |
Hi @nixmeer @eliyastein , Thanks for being patient while someone got back to you. I think in both cases the version of You should be able to fix this by running I'll add a version check in the top of esptool.py, so the error is clearer. |
Hello, I'm getting the exact same error as the OP, same OS and py27. I already did
EDIT: It works on the command line:
EDIT2: Never mind, I had installed esptool by git clone. Solved it by:
And now I have to call esptool using full path, otherwise esp-open-sdk gets in the way: Could you please help? |
Same errorTraceback (most recent call last): platform pyhton 3.6 ,Ubuntu 16.04 LTS, 64bit |
(For the record: NodeMCU ships quite an old version of esptool (v1.2-dev) plus some custom modifications.) If you run As it's ubuntu, installing the native PySerial with |
i get <Following Quotes> when '/usr/bin/env python' is entered in terminal of Linux 16.04 Ubuntu LTS and
"
rydot@rydot-pc:~/Downloads/nodemcu-firmware-2.2.1-master_20181207$
/usr/bin/env python
Python 3.6.0 |Anaconda 4.3.0 (64-bit)| (default, Dec 23 2016, 12:22:00)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>
"
then followed by
sudo apt-get install python3-serial but i get still the same error.
|
You seem to have Python installed via "Anaconda" in addition to (or instead of) the system Python. This is why 'pip' and system Python packages aren't working. You can try something like this to install pyserial under the "conda" package manager for Anaconda: |
I used |
What solved it for me is not calling the script I was testing it with "serial.py", rename to something else. |
working fine thanks |
I had the same problem. installing the pyserial didn't work. Then I realized that I don't have pip for Python2.7 and pyserial was installed on Python3.8. |
After upgrade yesterday is esptool not working anymore. I thought that python-pip is not available anymore. Only python3-pip alias pip3 My system: Python3 version: When i try to install python-pip: But after a short research you can get pip for python2 on this site of Python. https://pip.pypa.io/en/stable/installing/ after that you can install esptool and pyserial as berfore. But there is a warning that python2 stops at januari 2021. So maybe a good idea that esptool runs on python3? |
@henkiejan1 esptool.py supports Python 3 since esptool release 1.3 (January 2017). In most Debian/Ubuntu based Linux distros (I think including Mint), the |
From: ESP8266_RTOS_SDK/components/esptool_py/esptool/esptool.py You may be able to work around this by 'pip uninstall serial; pip install pyserial' There is no good fix for this right now, apart from configuring virtualenvs. |
I was getting the same error on ubuntu 24.04, |
Any help would be much appreciated:
Python version: Python 2.7.10
ESP hardware in use: ESP8266
The text was updated successfully, but these errors were encountered: