-
Notifications
You must be signed in to change notification settings - Fork 7.6k
No "Serial" Module #13
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
Comments
Hi I had the same issue, you're missing pyserial. You can install pyserial via pip. Open CMD as Administrator and type: pip install pyserial I believe that pip is installed by default when installing python, Pip should go and get pyserial and install it in the correct location. Restart Arduino IDE and Build, worked for me. |
Ah, excellent, thanks. Now it compiles and gives me:
So that's something. |
That error seems related to uploading, double check that you are holding down boot button then pressing the reset button and then releasing both, then click upload (arrow button). Does it compile by clicking the tick (verify) button? |
Yes, it compiles with the verify button, and yes, I'm doing the boot-and-reset press and upload. No dice. If I open the serial monitor at 115200 I do see some boot text and info about the wifi starting, so the device is alive. I've got flash frequency at 40MHz and flash speed at 115200, are those right? And does the programmer setting matter? I've got AVRISP mkII selected. |
Sorry for the delayed response - thanks for the screenshot. Still getting the same error for some reason. I'll keep tinkering. |
Hi @samjulien, did you have any luck getting this to work? |
Hi @samjulien, Did you by chance install the Silabs driver? I was able to get my Dev board working, once I go the driver install on Mac. I just finished testing PubSubClient on the ESP32, and it works good. |
@MrAPierce - not yet, still not sure what the problem is. I'm just uploading super simple LED blink code with an LED in pin 12 and a resistor to ground. @sorscode - are these same drivers by Silabs used for the ESP8266? Googling "silabs esp32" took me to the same page of "CP210x USB to UART Bridge VCP Drivers," which I do have installed from working with the 8266. Once I get this working I'm happy to submit a PR to the readme with anything pertinent. Definitely not just trying to be a pain, hoping to help out the larger community by being a guinea pig. :) |
@samjulien That would be the one. Which port do you have selected when uploading? I'm going to build a quick Windows 8.1 VM and test. |
Okay, cool, thanks. A buddy of mine pointed out that it's been several months since I installed those drivers for the ESP8266 and perhaps an update to them is in order, so I'll also give that a go and report back. |
Hmm, updated the drivers, took away the LED, did the boot mode dance, changed sketch to just empty |
Hi You need to install python2.7 and pyserial, Please see here: https://learn.adafruit.com/arduino-lesson-17-email-sending-movement-detector/installing-python-and-pyserial |
+1 for AnalogLamb, see https://github.com/pyserial/pyserial, or just type |
Yeah, above I had already installed pyserial and was able to compile but got a different error. That was on Windows 8.1. I just got a new laptop with Windows 10 on it and will give this another shot soon. |
I too am seeing the serial error "ImportError: No module named serial" in spite of having both python and pyserial. When I opened up a python console on my Terminal and imported serial, that worked fine. Any suggestions? |
Arduino compile runs the version of python that you have in the path :) so basically starting a shell without running .bash_profile and executing python. Where is your python installed? Why not use the default one (I use it daily and it's totally fine)? |
No that was just a theory. Turns out, I am running the inbuilt version of python, but the Arduino compiler still returns an error importing "serial". Importing serial in the terminal works fine. In fact, I printed the command that had failed in the compiler (using the verbose output functionality), and ran it in the terminal, and that executed fine. |
your PATH variable is different if you run in terminal than what programs trying to execute command see. Usually that is limited to /usr/bin:/usr/sbin:usb/local/bin:/usr/local/sbin |
So |
ok here is an idea :) |
|
So that worked! Thanks a lot! Adding the text to platform.txt revealed that the path it was trying to use was at |
do not change the path :) sudo mv /usr/bin/python /usr/bin/python_other
sudo ln -s /usr/local/bin/python /usr/bin/python that will link the correct python to /usr/bin and save the day :) |
So both those commands are forbidden. But I get the general idea. I'll try some other things out (like creating an alias, etc.), and see if that works. |
I had this same issue on windows with the sparkfun board... I installed pyserial, then got the next issue. Then I went back to holding the reset button while it programmed, and it worked. Thanks guys! |
Hi all; I'm working on a mac with homebrew installed python. Arduino seems to be ignoring my path - as I choose to use the homebrew python over the system python. Nevertheless, if I
I don't have my esp32 hooked up right now, but will test it later. |
FYI - the above solution works (for homebrewed python macs) I was able to upload sketches and get them working on my esp32 (ESP32 Thing from Sparkfun) Ideally, the IDE would have recognize my path settings so one can avoid the work around. Now I want to find/use a CLI-based toolchain to just avoid the Arduino IDE. |
@dgdosen if you want to use it without the IDE:
|
I can recommend using platform.io to do ESP32 builds on the command line without an IDE. See http://platformio.org/get-started/cli |
@blackketter and how is ESP32 working on platformio? |
Well, I haven't dug in deeply but a blink example compiled, downloaded and ran perfectly on my SparkFun ESP32 Thing. |
So I figured out a workaround for this problem and got the code to work on a Mac.
Copy this path.
|
this is now all resolved because python is no longer required on Windows |
here am working with esp32 and arduino but when i connect my esp32 its not showing me the port can anyone solve this ???? |
@harshithuchil, did you already solve the issue? |
On Fedora you follow these instructions: https://github.com/espressif/arduino-esp32/blob/master/docs/arduino-ide/fedora.md And in addition to that, you run |
For anyone who comes here from a search engine. On Ubuntu 19.04, my version of
Then install pyserial pip2 install pyserial |
Thank you @psiphi75. That was exactly the solution on Ubuntu 19.10 as well. |
Thank you @psiphi75. That was exactly the solution on Debian 10 as well. |
Thank you @psiphi75. That was right step to the solution on Ubuntu 20.04 as well. |
python2 is past end of life. Move forward to python3 instead of backwards. |
to solve this issue just follow these steps
regards |
Issue: import serial module not found : for library clash : worked for me because in my case this error was due to python supported by IDE |
on Linux systems just try this |
|
I encountered a similar issue when working with Python-based tools on a different setup. The error usually happens because the required For detailed steps on setting up Python and Pip (though the guide is for Ubuntu 24.04), you can check out Vultr's Python and Pip Installation Guide for Ubuntu. While the guide is Linux-focused, the concepts translate well to troubleshooting Python dependencies on any OS. Once you’ve pip set up, just run: pip install pyserial That should resolve the error! |
Hi there. Windows 8.1 here. Followed the instructions on getting set up and receiving the following when trying to upload a blinking light sketch:
Any ideas?
P.S. Thanks for working on this port!
The text was updated successfully, but these errors were encountered: