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

Default packages fail to install if PIP_REQUIRE_VIRTUALENV is set #162

Open
liamdawson opened this issue Jul 12, 2023 · 0 comments
Open

Comments

@liamdawson
Copy link

When installing a new Python version, it failed when attempting to install default packages:

Installed Python-3.11.4 to /Users/myusername/.asdf/installs/python/3.11.4

Installing default python packages...ERROR: Could not find an activated virtualenv (required).

This is because I have PIP_REQUIRE_VIRTUALENV set to true in my shell. Looking at the install command, it uses pip as such:

PATH="$ASDF_INSTALL_PATH/bin:$PATH" pip install -U -r "$packages_file"

According to this Stack Overflow answer, I believe this command should include the --isolated flag. In my case, adding the flag works:

$ pip install -U -r ~/.default-python-packages
ERROR: Could not find an activated virtualenv (required).

$ pip install -U -r ~/.default-python-packages --isolated
Requirement already satisfied: ...
liamdawson added a commit to liamdawson/chezmoi-state that referenced this issue Sep 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant