Search code examples
pythonwindowsrustesp32esp-idf

Error building esp-idf-template on Windows


I'm following the Rust on ESP guide here. No matter which parameters I pick when generating the template, I always get:

  ERROR: This script was called from a virtual environment, can not create a virtual environment again
  Error: Could not install esp-idf

  Caused by:
      command '"python" "C:\\test\\boop\\.embuild\\espressif\\esp-idf\\release-v5.0\\tools\\idf_tools.py" "--idf-path" "C:\\test\\boop\\.embuild\\espressif\\esp-idf\\release-v5.0" "--non-interactive" "install-python-env"' exited with non-zero status code 1

Running the single-quoted command by itself gives the same error: ERROR: This script was called from a virtual environment, can not create a virtual environment again

What does this error mean and how might I fix this problem, or otherwise compile esp-idf-template?


Solution

  • Thanks to Nathaniel's comment, I found out that I had two installations of python:

    C:\Users\Me\.platformio\penv\Scripts\python.exe
    C:\Users\Me\AppData\Local\Microsoft\WindowsApps\python.exe
    

    I deleted the platformio installation and was able to build esp-idf-template.