0

I am unable to install esp-idf. After cloning from git, esp-idf creates the directory(repository?) ~/esp/esp-idf (I cloned in ~/esp, and it created esp-idf directory). When I try to run install, I get this error

CalledProcessError: Command '['/usr/bin/python', '-m', 'virtualenv', '/home/thabo/.espressif/python_env/idf4.2_py3.8_env']' returned non-zero exit status 1.

This is what happens when I run ./install.sh

Installing ESP-IDF tools
Installing tools: xtensa-esp32-elf, xtensa-esp32s2-elf, esp32ulp-elf, esp32s2ulp-elf, openocd-esp32
Skipping xtensa-esp32-elf@esp-2020r3-8.4.0 (already installed)
Skipping xtensa-esp32s2-elf@esp-2020r3-8.4.0 (already installed)
Skipping esp32ulp-elf@2.28.51-esp-20191205 (already installed)
Skipping esp32s2ulp-elf@2.28.51-esp-20191205 (already installed)
Skipping openocd-esp32@v0.10.0-esp32-20200709 (already installed)
Installing Python environment and packages
Creating a new Python environment in /home/thabo/.espressif/python_env/idf4.2_py3.8_env
ModuleNotFoundError: No module named 'virtualenv.seed.via_app_data'
Traceback (most recent call last):
  File "/home/thabo/esp/esp-idf/tools/idf_tools.py", line 1492, in <module>
    main(sys.argv[1:])
  File "/home/thabo/esp/esp-idf/tools/idf_tools.py", line 1488, in main
    action_func(args)
  File "/home/thabo/esp/esp-idf/tools/idf_tools.py", line 1207, in action_install_python_env
    subprocess.check_call([sys.executable, '-m', 'virtualenv', idf_python_env_path],
  File "/usr/lib/python3.8/subprocess.py", line 364, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/usr/bin/python', '-m', 'virtualenv', '/home/thabo/.espressif/python_env/idf4.2_py3.8_env']' returned non-zero exit status 1.
  • You may want to post this at esp32.com, you'll probably get more response there. It's also good to include basic stuff like the operating system you're using (the exact version, this is important). I can imagine that it's a python3 issue, but not sure at all. – StrawHat Mar 24 '21 at 03:11

1 Answers1

1

ESP-IDF tools requires Python and Virtualenv package to be installed. Virtualenv is separate package from Python, it's not the same like venv module included in Python 3.

To fix the problem install Virtualenv package. Then retry ./install.sh

Example for Debian:

apt-get install virtualenv

It's possible to test virtualenv package by following command:

python -m virtualenv --version
georgik
  • 81
  • 1
  • 2