Open mtnpke opened 2 years ago
This is a regression, with a66098ad1a9ec72de9fd4d63ecce8bd23d6b6d74 it was working correctly. After resetting the python version to 3.9.6 it works again, while leaving all other commits which have landed in the mean time alone.
I've reproduced this on Windows 22H2 (19045.2486) with vcpkg ec7216c8e as a submodule, using this command line:
vcpkg\packages\python3_x64-windows\tools\python3\python.exe -m pip install imgui[pyglet]
It appears this is a problem with where the library compile include directories are targeted (or conversely where the headers and libs are copied).
I implemented the workaround by:
python3_x64-windows\include\python3.10
to python3_x64-windows\tools\python3\include
python3_x64-windows\lib
to python3_x64-windows\tools\python3\libs
find_package(Python COMPONENTS Interpreter Development) error
This is an automated message. Per our repo policy, stale issues get closed if there has been no activity in the past 180 days. The issue will be automatically closed in 14 days. If you wish to keep this issue open, please add a new comment.
When installing the Python3 interpreter with vcpkg, it cannot be used to compile C extension packages. It does not find the python.h include files and (on Windows/MSVC) the python39.lib file. Error message: "Cannot open include file: 'Python.h': No such file or directory".
Is your feature request related to a problem? Please describe. Trying to install C extension packages fails, but in my opinion it should work in a "fully-fledged" Python installation.
To reproduce:
vcpkg install python3
<vcpkg install path>/tools/python3/python -m pip install typed-ast --no-binary ":all:"
Result:
Proposed solution I'm not exactly sure. Either install the
include
andlibs
files also to thetools
location or make sure that python correctly picks up the locations where they are stored. Maybe I'm just missing a config option?Describe alternatives you've considered No compilation is needed when using precompiled wheels, but that is not possible in every case. I'm currently copying the headers and lib files in my CMakeLists.txt as workaround.
Additional context I'm using Windows 10 20H2. My machine is using the en-US locale. Tested with vcpkg 2021-11-02-af04ebf6274fd6f7a941bff4662b3955c64f6f42.