asdf-community / asdf-community/asdf-python
Default packages fail to install if `PIP_REQUIRE_VIRTUALENV` is set
- Dominant language
- Shell
- Stars
- 729
- Forks
- 65
- PR merge metrics
- No merged PRs in 30d
Description
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:
https://github.com/asdf-community/asdf-python/blob/8505457c6612514688ba473386d2063d4c83bb54/bin/install#L38
According to [this Stack Overflow answer](https://stackoverflow.com/a/30515378), 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: ...
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.