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

Duplicate - not fixed - release/v4.4 install.sh venv error (IDFGH-10060) #11336 (IDFGH-14136) #14940

Closed
3 tasks done
hubbardmeister opened this issue Nov 26, 2024 · 3 comments
Closed
3 tasks done
Assignees
Labels
Resolution: Cannot Reproduce Issue cannot be reproduced Status: Done Issue is done internally Type: Bug bugs in IDF

Comments

@hubbardmeister
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.

ESP-IDF v5.4-dev-4375-gf420609c33-dirty

Operating System used.

Linux

How did you build your project?

Command line with idf.py

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

None

What is the expected behavior?

Diff - for fix.

diff --git a/tools/idf_tools.py b/tools/idf_tools.py
index 5ae9f4cae2..2186a1604a 100755
--- a/tools/idf_tools.py
+++ b/tools/idf_tools.py
@@ -2581,7 +2581,7 @@ def action_install_python_env(args): # type: ignore
nix_store = os.environ.get('NIX_STORE')
is_nix = nix_store is not None and sys.base_prefix.startswith(nix_store) and sys.prefix.startswith(nix_store)

  • is_virtualenv = not is_nix and (hasattr(sys, 'real_prefix') or (hasattr(sys, 'base_prefix') and sys.base_prefix != sys.prefix))
  • is_virtualenv = not is_nix and (hasattr(sys, 'real_prefix') and (hasattr(sys, 'base_prefix') and sys.base_prefix != sys.prefix))
    if is_virtualenv and (not os.path.exists(idf_python_env_path) or reinstall):
    fatal('This script was called from a virtual environment, can not create a virtual environment again')
    raise SystemExit(1)

What is the actual behavior?

fails on venv error

Steps to reproduce.

running install.sh in a python venv environment.

Build or installation Logs.

This script was called from a virtual environment, can not create a virtual environment again'

More Information.

No, known error, pulled branch above, diff still not in code base.

@hubbardmeister hubbardmeister added the Type: Bug bugs in IDF label Nov 26, 2024
@github-actions github-actions bot changed the title Duplicate - not fixed - release/v4.4 install.sh venv error (IDFGH-10060) #11336 Duplicate - not fixed - release/v4.4 install.sh venv error (IDFGH-10060) #11336 (IDFGH-14136) Nov 26, 2024
@espressif-bot espressif-bot added the Status: Opened Issue is new label Nov 26, 2024
@dobairoland
Copy link
Collaborator

Hi @hubbardmeister. Thanks for your report. I wonder if your issue really relates to the linked duplicate.

Are you using NIXOS or something else? Could you please clarify the diff you provided? I think some characters are missing.

@dobairoland
Copy link
Collaborator

I'm closing this for inactivity.

@dobairoland dobairoland closed this as not planned Won't fix, can't repro, duplicate, stale Dec 16, 2024
@espressif-bot espressif-bot added Status: Done Issue is done internally Resolution: Cannot Reproduce Issue cannot be reproduced and removed Status: Opened Issue is new labels Dec 16, 2024
@hubbardmeister
Copy link
Author

Apologies for tardy response. Still an issue -

i'm running Ubuntu, have venv for my python/shell environment. This is still an issue, just did a fresh download today and had to modify idf_tools.py again.

(venv) rhubbard@rhubbard-XPS-8900:~/esp/esp-idf$ get_idf
Checking "python3" ...
Python 3.12.8
"python3" has been detected
Activating ESP-IDF 5.5
Setting IDF_PATH to '/home/rhubbard/esp/esp-idf'.

  • Checking python version ... 3.12.8
  • Checking python dependencies ... OK
  • Deactivating the current ESP-IDF environment (if any) ... OK
  • Establishing a new ESP-IDF environment ... OK
  • Identifying shell ... bash
  • Detecting outdated tools in system ... OK - no outdated tools found
  • Shell completion ... Autocompletion code generated

Attached diff -
gitdiff.txt

Her is the Diff plain text.

diff --git a/tools/idf_tools.py b/tools/idf_tools.py
index b5e4f024ec..b7dbd24c11 100755
--- a/tools/idf_tools.py
+++ b/tools/idf_tools.py
@@ -2581,7 +2581,7 @@ def action_install_python_env(args): # type: ignore
nix_store = os.environ.get('NIX_STORE')
is_nix = nix_store is not None and sys.base_prefix.startswith(nix_store) and sys.prefix.startswith(nix_store)

  • is_virtualenv = not is_nix and (hasattr(sys, 'real_prefix') or (hasattr(sys, 'base_prefix') and sys.base_prefix != sys.prefix))
  • is_virtualenv = not is_nix and (hasattr(sys, 'real_prefix') and (hasattr(sys, 'base_prefix') and sys.base_prefix != sys.prefix))
    if is_virtualenv and (not os.path.exists(idf_python_env_path) or reinstall):
    fatal('This script was called from a virtual environment, can not create a virtual environment again')
    raise SystemExit(1)
    ~

This is pulled from mater branch.
git branch --show-current
master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Cannot Reproduce Issue cannot be reproduced Status: Done Issue is done internally Type: Bug bugs in IDF
Projects
None yet
Development

No branches or pull requests

4 participants