Skip to content

https://dl.espressif.com/dl/package_esp32_index.json ImportError [#350] #2669

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
rtek1000 opened this issue Apr 14, 2019 · 1 comment
Closed

Comments

@rtek1000
Copy link

Hi,

I tried to install in linux, via https://dl.espressif.com/dl/package_esp32_index.json, but presented error "ImportError: No module named serial.tools.list_port" when compiling, after searching found issue # 350,

#350:

I think in both cases the version of pyserial which is installed is too old, and doesn't have serial.tools.list_ports module.

You should be able to fix this by running pip install pyserial, or re-installing esptool with pip install esptool.

This pip is not installed, so you need 'sudo apt-get install python-pip', but these packages are +/- 170MB.

So I canceled and I found the installation tutorial for linux on the main page of the project.

I was running the setup commands below, but upon realizing that I was downloading the esp32 package again, so, again, I canceled.

sudo usermod -a -G dialout $USER &&
sudo apt-get install git &&
wget https://bootstrap.pypa.io/get-pip.py &&
sudo python get-pip.py &&
sudo pip install pyserial &&
mkdir -p ~/Arduino/hardware/espressif &&
cd ~/Arduino/hardware/espressif &&
git clone https://github.com/espressif/arduino-esp32.git esp32 &&
cd esp32 &&
git submodule update --init --recursive &&
cd tools &&
python3 get.py

I canceled this part (using Ctrl+C):

Installing collected packages: pyserial
Successfully installed pyserial-3.4
Cloning into 'esp32'...
remote: Enumerating objects: 49, done.
remote: Counting objects: 100% (49/49), done.
remote: Compressing objects: 100% (37/37), done.
^Cceiving objects: 31% (3903/12403), 18.52 MiB | 165.00 KiB/s

The fact is that it solved the problem, there is no error compiling.

I do not know what this does "python3 get.py", is it necessary?

So I think it might be interesting to upgrade the json system, and / or add the install add command, without having to download the packages that the IDE has already downloaded.

Using:

  • Xubuntu x64 18.10
  • Arduino IDE 1.8.9

Thank you.

@me-no-dev
Copy link
Member

you do not need to download anything else but setup pip and pyserial. Linuxes are too different so we can not precompile the python into binary and expect it to work, therefore we kept it as python scripts.

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

2 participants