-
-
Notifications
You must be signed in to change notification settings - Fork 427
Open
Description
Related to #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/includePresumably pyenv-virtualenv should do something like this by default when you create the environment?
Metadata
Metadata
Assignees
Labels
No labels