$VIRTUAL_ENV and $PATH don't agree
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 35/100
Línea de trabajo
Start by reproducing the reported mismatch with pyenv-virtualenv 2.4.17, Python 3.12, and the shown Solus Linux environment. Trace how activation sets $VIRTUAL_ENV and how the shims select executables, then verify that both paths consistently identify the same virtual environment.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
pyenv sets $VIRTUAL_ENV to:
$PYENV_ROOT/versions/<version>/envs/<venv>
but the shims point to the symlinks:
$PYENV_ROOT/versions/<venv>/bin/*
That annoys Neovim and my OCD. See:
Python virtualenv ~
- WARNING $VIRTUAL_ENV is set to: /home/mick/.local/state/pyenv/versions/3.12.7/envs/mutaid-msgenc
And its bin directory contains: python, python3, python3.12
But $PATH yields this python executable: /home/mick/.local/state/pyenv/versions/mutaid-msgenc/bin/python
And $PATH in subshells yields this python executable: /home/mick/.local/state/pyenv/versions/mutaid-msgenc/bin/python
And $PATH yields this python3 executable: /home/mick/.local/state/pyenv/versions/mutaid-msgenc/bin/python3
And $PATH in subshells yields this python3 executable: /home/mick/.local/state/pyenv/versions/mutaid-msgenc/bin/python3
And $PATH yields this python3.12 executable: /home/mick/.local/state/pyenv/versions/mutaid-msgenc/bin/python3.12
And $PATH in subshells yields this python3.12 executable: /home/mick/.local/state/pyenv/versions/mutaid-msgenc/bin/python3.12
So invoking Python may lead to unexpected results.
- ADVICE:
- $PATH ambiguities in subshells typically are caused by your shell config overriding the $PATH previously set by the virtualenv. Either prevent them from doing so, or use this workaround: https://vi.stackexchange.com/a/34996
- $PATH ambiguities arise if the virtualenv is not properly activated prior to launching Nvim. Close Nvim, activate the virtualenv, check that invoking Python from the command line launches the correct one, then relaunch Nvim.
Shouldn't $PATH and $VIRTUAL_ENV (both set by pyenv!) agree on this and not be set to different paths into the same virtualenv?
Description
-
Platform information (e.g. Ubuntu Linux 16.04):
Solus Linux Budgie 4.6 convergence -
OS architecture (e.g. amd64):
x86_64 -
pyenv version:
2.4.17 -
Python version:
3.12 -
C Compiler information (e.g. gcc 7.3):
gcc (Solus) 14.2.0
- Lenguaje dominante
- Shell
- Estrellas
- 6.7k
- Forks
- 427
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: 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 pyenv/pyenv-virtualenv
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
pyenv/pyenv-virtualenv#524 · 5 comentarios ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 42/100
pyenv/pyenv-virtualenv#515 · 5 comentarios ·
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
pyenv/pyenv-virtualenv#514 · 1 comentario ·
-
enhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
pyenv/pyenv-virtualenv#510 · 5 reacciones ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 25/100
pyenv/pyenv-virtualenv#507 ·
Todos los issues de pyenv/pyenv-virtualenv
Issues similares
-
Update vtm to 2026.9.28Abiertopackage-update
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
oSoWoSo/vOid_Community_repOsitory#207 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
alunduil/alunduil-chezmoi#815 ·
Los mantenedores suelen responder en 1 día
-
good first issue new package
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
wimpysworld/deb-get#2035 ·
Los mantenedores suelen responder en 1 día
-
automation documentation
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 92/100
termux/termux-packages#32085 ·
Los mantenedores suelen responder en 1 día