`poetry shell` and `poetry run` access different pip instances
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 35/100
Línea de trabajo
Reproduce la discrepancia del setup con un directorio vacío descrito en el issue usando poetry install, poetry run pip --version y poetry shell, y después inspecciona el comportamiento de la activación del shell y de las variables de entorno descrito allí. Se considera terminado cuando pip dentro del shell iniciado se resuelve en el mismo entorno virtual y la misma instancia de pip que poetry run pip, incluida la ruta indicada por which pip.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
- I am on the latest Poetry version.
- I have searched the issues of this repo and believe that this is not a duplicate.
- If an exception occurs when executing a command, I executed it again in debug mode (
-vvvoption).
- OS version and name: macOS Big Sur 11.6.4 (20G417)
- Poetry version: 1.1.13
- Link of a Gist with the contents of your pyproject.toml file: https://gist.github.com/itcarroll/f46c6dbc6f53da88e7715f877be41452
Issue
I'm getting different pip instances depending on whether I use poetry run pip or start a new shell with poetry shell. The correct one is poetry run pip. The pip that poetry shell uses is wrong, and is not even at the path given by which pip. A clue might be that poetry shell has an extra environment variable also pointing to the wrong venv: __PYVENV_LAUNCHER__=/Users/icarroll/.local/pipx/venvs/poetry/bin/python.
Starting in an empty directory containing only pyproject.toml, here's what I'm seeing:
% poetry install
Creating virtualenv bug-report-f5FbZAGT-py3.8 in /Users/icarroll/Library/Caches/pypoetry/virtualenvs
Updating dependencies
Resolving dependencies... (0.1s)
Writing lock file
% poetry run pip --version
pip 22.0.3 from /Users/icarroll/Library/Caches/pypoetry/virtualenvs/bug-report-f5FbZAGT-py3.8/lib/python3.8/site-packages/pip (python 3.8)
% poetry shell
Spawning shell within /Users/icarroll/Library/Caches/pypoetry/virtualenvs/bug-report-f5FbZAGT-py3.8
Restored session: Tue Mar 8 18:54:56 EST 2022
% . /Users/icarroll/Library/Caches/pypoetry/virtualenvs/bug-report-f5FbZAGT-py3.8/bin/activate
(bug-report-f5FbZAGT-py3.8) % pip --version
pip 22.0.4 from /Users/icarroll/.local/pipx/shared/lib/python3.8/site-packages/pip (python 3.8)
(bug-report-f5FbZAGT-py3.8) % which pip
/Users/icarroll/Library/Caches/pypoetry/virtualenvs/bug-report-f5FbZAGT-py3.8/bin/pip
- Lenguaje dominante
- Python
- Estrellas
- 141
- Forks
- 10
- Merge medio
- 59 min
- PR fusionados (30 d)
- 3
Preparar el entorno
Aún no hemos revisado los archivos de configuración de este proyecto. Empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de python-poetry/poetry-plugin-shell
-
Dificultad 4/5 3-5 días Aptitud para principiantes 20/100
python-poetry/poetry-plugin-shell#43 · 1 comentario · 1 reacción ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 52/100
python-poetry/poetry-plugin-shell#42 · 4 comentarios · 15 reacciones ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 38/100
python-poetry/poetry-plugin-shell#40 · 4 comentarios · 2 reacciones ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 42/100
python-poetry/poetry-plugin-shell#37 · 3 comentarios ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 25/100
python-poetry/poetry-plugin-shell#34 · 1 comentario ·
Todos los issues de python-poetry/poetry-plugin-shell
Issues similares
-
bug server
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
sportsdataverse/sportsdataverse-py#641 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
googleapis/google-cloud-python#18532 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día