Eclipse IDE - No module named serial
Eclipse IDE - No module named serial
Hey All,
I am super stoked to have my hands on a few ESP32s. From the command line I am able to build and flash the myapp code. In Eclipse I am unable to configure it properly to see my pyserial installation. Once everything is done compiling I get a "No module named serial" error. Can you please let me know how to point Eclipse in the right direction to see my python setup?
Thanks
Joe
I am super stoked to have my hands on a few ESP32s. From the command line I am able to build and flash the myapp code. In Eclipse I am unable to configure it properly to see my pyserial installation. Once everything is done compiling I get a "No module named serial" error. Can you please let me know how to point Eclipse in the right direction to see my python setup?
Thanks
Joe
Re: Eclipse IDE - No module named serial
Howdy Joe,
Did you by any chance see the documentation here:
http://esp-idf.readthedocs.io/en/latest ... setup.html
Step 0 is to install some pre-reqs an that looks like includes "python-serial"
Did you by any chance see the documentation here:
http://esp-idf.readthedocs.io/en/latest ... setup.html
Step 0 is to install some pre-reqs an that looks like includes "python-serial"
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32
Re: Eclipse IDE - No module named serial
Kolban,
Thanks for your response. I am able to build everything from the command line. When I run "pip3 list" it both shows pyserial is installed. My issue is the one step to get eclipse to be able to import (or see) the pyserial installation.
Joe
Thanks for your response. I am able to build everything from the command line. When I run "pip3 list" it both shows pyserial is installed. My issue is the one step to get eclipse to be able to import (or see) the pyserial installation.
Joe
Re: Eclipse IDE - No module named serial
Howdy Joe, did you see this video tutorial:
https://www.youtube.com/watch?v=bYh2w0HzS7s
Does your configuration dramatically change from that described there? If yes, can you describe your recipes?
Neil
https://www.youtube.com/watch?v=bYh2w0HzS7s
Does your configuration dramatically change from that described there? If yes, can you describe your recipes?
Neil
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32
Re: Eclipse IDE - No module named serial
Hi phando,
As hinted by WiFive, esptool.py currently only supports Python 2 (porting to Python 3 is in progress but still a reasonable time away.) A menuconfig option can be used to set a different Python interpreter, if the default "python" is Python 3 (can check via "python -v").
What OS are you using?
Angus
As hinted by WiFive, esptool.py currently only supports Python 2 (porting to Python 3 is in progress but still a reasonable time away.) A menuconfig option can be used to set a different Python interpreter, if the default "python" is Python 3 (can check via "python -v").
What OS are you using?
Angus
Re: Eclipse IDE - No module named serial
Thanks for all the responses.
@Angus, I am using OSX, I probably should have mentioned that in my first post.
@WiFive, yes, I have watched that video about ten times. My recipe looks exactly the same as the in the video.
@Kolban, great video and I just bought your book.
I didn't know esptool only works with python 2.7. I had two versions of python on my machine, so I made sure to remove 3.x. To be thorough, I reinstalled 2.7 with brew. From there I used brew to install pyserial. Now when I "pip list" it shows:
Still my problem exists. I can build and flash fine from the command line, but when I run the flash target from eclipse, it looks like it compiles fine and bails out right when it tries to flash the chip.
I have seen some threads talking about pyDev in the eclipse environment. It seems all I need is to get eclipse to point to the brew python so it can see the serial package.
@Angus, I am using OSX, I probably should have mentioned that in my first post.
@WiFive, yes, I have watched that video about ten times. My recipe looks exactly the same as the in the video.
@Kolban, great video and I just bought your book.
I didn't know esptool only works with python 2.7. I had two versions of python on my machine, so I made sure to remove 3.x. To be thorough, I reinstalled 2.7 with brew. From there I used brew to install pyserial. Now when I "pip list" it shows:
Code: Select all
pip (9.0.1)
pyserial (3.2.1)
setuptools (28.8.0)
virtualenv (15.0.3)
Code: Select all
File "/Users/jandolina/esp/esp-idf/components/esptool_py/esptool/esptool.py", line 25, in <module> import serial
ImportError: No module named serial
Re: Eclipse IDE - No module named serial
Sounds like it. One way is:phando wrote: I have seen some threads talking about pyDev in the eclipse environment. It seems all I need is to get eclipse to point to the brew python so it can see the serial package.
- In Terminal, run "which python2.7" and copy the output.
- "make menuconfig"
- Under "SDK Tool Configuration" -> "Python 2 Interpreter", delete the default name and paste the command output.
The other way is to manipulate the PATH inside Eclipse so your Python directory comes before it's internal pyDev version. I'm afraid I don't know how to do this.
Re: Eclipse IDE - No module named serial
Great day in the morning!
Changing python's path in the interpreter did the trick.
Thank you all.
Changing python's path in the interpreter did the trick.
Thank you all.
Re: Eclipse IDE - No module named serial
phando, what exactly did you do to fix this problem? I have exactly the same issue. I can compile from the command line, but when make runs from within Eclipse it seems to use a python version that does not have the serial module installed.
Who is online
Users browsing this forum: No registered users and 184 guests