Page 1 of 1

while setting up ESP-IDF in Ubuntu export.sh gives error

Posted: Thu Jul 14, 2022 2:00 pm
by Abdul Samad
I am following instructions given in the topic: "Standard Toolchain Setup for Linux and macOS". While following step 4 to setup the environment variables I get the following errors while trying to execute export.sh.

abdul@ubuntu:~/esp/esp-idf$ . $HOME/esp/esp-idf/export.sh
Setting IDF_PATH to '/home/abdul/esp/esp-idf'
Detecting the Python interpreter
Checking "python3" ...
Checking "python" ...
Checking "python3.8" ...
Python 3.8.13
"python3.8" has been detected
Checking Python compatibility
Checking other ESP-IDF version.
Adding ESP-IDF tools to PATH...
Using Python interpreter in /home/abdul/.espressif/python_env/idf5.0_py3.8_env/bin/python
Checking if Python packages are up to date...
Skipping the download of /home/abdul/.espressif/espidf.constraints.v5.0.txt because it was downloaded recently. If you believe that this is causing you trouble then remove it manually and re-run your install script.
Constraint file: /home/abdul/.espressif/espidf.constraints.v5.0.txt
Requirement files:
- /home/abdul/esp/esp-idf/tools/requirements/requirements.core.txt
Python being checked: /home/abdul/.espressif/python_env/idf5.0_py3.8_env/bin/python
pkg_resources cannot be imported probably because the pip package is not installed and/or using a legacy Python interpreter. Please refer to the Get Started section of the ESP-IDF Programming Guide for setting up the required packages.

I have the following Python version installed:
abdul@ubuntu:~/esp/esp-idf$ python --version
Python 3.8.13
I have the following pip3 version installed:
abdul@ubuntu:~/esp/esp-idf$ pip3 --version
pip 9.0.1 from /usr/lib/python3/dist-packages (python 3.6)

Kindly guide in fixing this issue.

Re: while setting up ESP-IDF in Ubuntu export.sh gives error

Posted: Fri Jul 15, 2022 3:25 pm
by gtjoseph
The install scripts are trying to run 'pip' not 'pip3'.
Try running ' /home/abdul/.espressif/python_env/idf5.0_py3.8_env/bin/python -m pip --version' and see what you get.

Re: while setting up ESP-IDF in Ubuntu export.sh gives error

Posted: Mon Jul 18, 2022 7:11 am
by ESP_Roland
It looks like that the python3.8 package was installed additionally because the bundled python3 is older. The package however is missing setuptools. Please look at the repository from where you've downloaded python3.8. There should be other packages as well. My guess is python3.8-setuptools is what is missing from your system.