asdf-community / asdf-community/asdf-python
Default packages fail to install if `PIP_REQUIRE_VIRTUALENV` is set
- Lenguaje dominante
- Shell
- Estrellas
- 729
- Forks
- 65
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
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: ...
```
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Línea de trabajo
Inspecciona bin/install alrededor de la línea 38, donde se instalan los paquetes predeterminados con pip. Reproduce el fallo usando PIP_REQUIRE_VIRTUALENV=true y ~/.default-python-packages, y verifica que la instalación de una nueva versión de Python se complete y que los paquetes predeterminados se instalen sin el error de virtualenv.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- python, shell
- Área
- tooling
- Tipo de issue
- Error
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Estado de actividad
- Estancado
- Claridad
- Bien especificado
- Aptitud para principiantes
- 48/100