asdf-community / asdf-community/asdf-python
Default packages fail to install if `PIP_REQUIRE_VIRTUALENV` is set
- Lingua principale
- Shell
- Stelle
- 729
- Fork
- 65
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
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: ...
```
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Esamina bin/install intorno alla riga 38, dove vengono installati i pacchetti predefiniti con pip. Riproduci il problema usando PIP_REQUIRE_VIRTUALENV=true e ~/.default-python-packages, quindi verifica che l’installazione di una nuova versione di Python venga completata e che i pacchetti predefiniti vengano installati senza l’errore di virtualenv.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python, shell
- Ambito
- tooling
- Tipo di issue
- Bug
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Stato di attività
- Ferma
- Chiarezza
- Specificata chiaramente
- Idoneità per principianti
- 48/100