Adapt python3-config to produce correct output in a virtual environment
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 42/100
Línea de trabajo
Start by reproducing the pyenv virtualenv, pyenv activate, and python3-config --includes commands from the issue, then trace how the virtual environment's include directory and python3-config output are created. Done means a newly created environment provides valid Python headers and python3-config --includes no longer points to an empty or duplicated include path.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Related to https://github.com/pyenv/pyenv-virtualenv/issues/462
Steps to reproduce
- Create a new virtualenv and activate it:
$ pyenv virtualenv 3.12.11 test
$ pyenv activate test
- Check that
python3-configpoints to pyenv's shim
$ which python3-config
/home/ali/.pyenv/shims/python3-config
- Check where python3-config include directories are (same directory is listed twice for some reason?):
$ python3-config --includes
-I/home/ali/.pyenv/versions/3.12.11/envs/test/include/python3.12 -I/home/ali/.pyenv/versions/3.12.11/envs/test/include/python3.12
- Check what's in that directory (nothing)
ls -al /home/ali/.pyenv/versions/3.12.11/envs/test/include/python3.12
total 8
drwxr-xr-x 2 ali ali 4096 Aug 28 10:53 .
drwxr-xr-x 3 ali ali 4096 Aug 28 10:53 ..
Thus, whenever I try to compile something that needs to use python headers, I get the following error:
libsplinemodule.c:18:10: fatal error: Python.h: No such file or directory
18 | #include <Python.h>
| ^~~~~~~~~~
compilation terminated.
I can get around this by linking the virtualenv include directory to the original pyenv include directory:
$ rm -rf /home/ali/.pyenv/versions/3.12.11/envs/test/include
$ ln -s /home/ali/.pyenv/versions/3.12.11/include /home/ali/.pyenv/versions/3.12.11/envs/test/include
Presumably pyenv-virtualenv should do something like this by default when you create the environment?
- 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 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 ·
-
third-party
Dificultad 3/5 1-2 días Aptitud para principiantes 45/100
pyenv/pyenv-virtualenv#505 · 7 comentarios ·
Todos los issues de pyenv/pyenv-virtualenv
Issues similares
-
documentation
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
githubnext/gh-aw-workshop#3969 ·
Los mantenedores suelen responder en 1 día
-
Request: Remove l-town appAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
getumbrel/umbrel-apps#6137 ·
Los mantenedores suelen responder en 2 días
-
🎙️ task - fix(deployer): deploy --env prep runs deploy:dev where the repo declares deploy:prepAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
-
backlog bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
WLAN-Pi/wlanpi-profiler#306 ·
Los mantenedores suelen responder en 1 día
-
area: backend good first issue priority: P3 - low size: S type: bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Mizithra/ActiveTerrain#31 ·