Skip to content
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

IDF 5.2 fails to install Python venv (IDFGH-12140) #13196

Closed
3 tasks done
readmodifywrite opened this issue Feb 16, 2024 · 3 comments
Closed
3 tasks done

IDF 5.2 fails to install Python venv (IDFGH-12140) #13196

readmodifywrite opened this issue Feb 16, 2024 · 3 comments
Assignees
Labels
Resolution: NA Issue resolution is unavailable Status: Done Issue is done internally Type: Bug bugs in IDF

Comments

@readmodifywrite
Copy link

Answers checklist.

  • I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
  • I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
  • I have searched the issue tracker for a similar issue and not found a similar issue.

IDF version.

v5.2 11eaf41

Operating System used.

Linux

How did you build your project?

Command line with CMake

If you are using Windows, please specify command line type.

None

What is the expected behavior?

IDF 5.2 should.... work? Lol.

What is the actual behavior?

ERROR: /home/jeremy/.espressif/python_env/idf5.2_py3.8_env/bin/python doesn't exist! Please run the install script or "idf_tools.py install-python-env" in order to create it

This is after erasing ~/.espressif and running install.sh.

v5.2 doesn't create idf5.2_py3.8_env, so nothing works. Can't even run a clean command.

It does however, install idf5.1_py3.8_env.

It looks like renaming it to 5.2 instead of 5.1 gets it to work.

I'm using the actual v5.2 tag.

Did this work in your CI system? Why would it install differently on my machine vs the CI environment?

Steps to reproduce.

Install IDF 5.2. That's it.

Build or installation Logs.

No response

More Information.

No response

@readmodifywrite readmodifywrite added the Type: Bug bugs in IDF label Feb 16, 2024
@espressif-bot espressif-bot added the Status: Opened Issue is new label Feb 16, 2024
@github-actions github-actions bot changed the title IDF 5.2 fails to install Python venv IDF 5.2 fails to install Python venv (IDFGH-12140) Feb 16, 2024
@igrr
Copy link
Member

igrr commented Feb 16, 2024

Did this work in your CI system?

It did successfully install when building the Docker image: https://github.com/espressif/esp-idf/actions/runs/7911595216/job/21595996329, and it works in our internal CI as well.

Can you please try running git describe inside your copy of IDF? Does it say v5.2 or something else?

@readmodifywrite
Copy link
Author

v5.2

I checked out the actual tag.

It looks like a lot of commands are still looking for the 5.1 venv, and some are looking for 5.2.

So the fix is to copy the 5.1 the installer creates into 5.2, and keep the old 5.1.

@fhrbata
Copy link
Collaborator

fhrbata commented Feb 16, 2024

Hello @readmodifywrite ,

just a thought. Isn't it possible that you are running the install.sh within 5.1 env. activated. Meaning the IDF_PYTHON_ENV_PATH is actually set to 5.1 and it's used by the idf_tool.py?

I can reproduce this with

  1. checkout v5.1 tag and run install.sh
  2. activate 5.1 with export.sh
  3. checkout v5.2
  4. delete ~/.espressif
  5. run install.sh

In 2. the IDF_PYTHON_ENV_PATH is set to 5.1 and it's used in 5. Just a quick thought that might help.

@espressif-bot espressif-bot added Status: Reviewing Issue is being reviewed Status: In Progress Work is in progress and removed Status: Opened Issue is new Status: Reviewing Issue is being reviewed labels Feb 21, 2024
@espressif-bot espressif-bot added Status: Done Issue is done internally Resolution: NA Issue resolution is unavailable and removed Status: In Progress Work is in progress labels Mar 1, 2024
espressif-bot pushed a commit that referenced this issue Mar 6, 2024
Warn if IDF_PYTHON_ENV_PATH set to a suspicious path with
different ESP-IDF version and/or Python version.

Fail if the virtual environment was created for a different ESP-IDF
version.

Closes #13196
espressif-bot pushed a commit that referenced this issue Mar 13, 2024
Warn if IDF_PYTHON_ENV_PATH set to a suspicious path with
different ESP-IDF version and/or Python version.

Fail if the virtual environment was created for a different ESP-IDF
version.

Closes #13196
DarkZeros pushed a commit to DarkZeros/esp-idf that referenced this issue May 3, 2024
Warn if IDF_PYTHON_ENV_PATH set to a suspicious path with
different ESP-IDF version and/or Python version.

Fail if the virtual environment was created for a different ESP-IDF
version.

Closes espressif#13196
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: NA Issue resolution is unavailable Status: Done Issue is done internally Type: Bug bugs in IDF
Projects
None yet
Development

No branches or pull requests

5 participants