Replies: 5 comments 3 replies
-
Setting SET Python3_ROOT_DIR=C:/hostedtoolcache/windows/Python/3.8.3/x64
cmake -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake `
-DPython3_ROOT_DIR=C:/hostedtoolcache/windows/Python/3.8.3/x64 `
..
...
CMake Error at C:/Program Files/CMake/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find Python (missing: Python_NumPy_INCLUDE_DIRS NumPy) Content of ...
C:/hostedtoolcache/windows/Python/3.8.3/x64/libs/python3.lib
C:/hostedtoolcache/windows/Python/3.8.3/x64/libs/python38.lib
C:/hostedtoolcache/windows/Python/3.8.3/x64/libs/_tkinter.lib
C:/hostedtoolcache/windows/Python/3.8.3/x64/LICENSE.txt
C:/hostedtoolcache/windows/Python/3.8.3/x64/NEWS.txt
C:/hostedtoolcache/windows/Python/3.8.3/x64/python-3.8.3-amd64.exe
C:/hostedtoolcache/windows/Python/3.8.3/x64/python.exe
C:/hostedtoolcache/windows/Python/3.8.3/x64/python3.dll
C:/hostedtoolcache/windows/Python/3.8.3/x64/python3.exe
C:/hostedtoolcache/windows/Python/3.8.3/x64/python38.dll
C:/hostedtoolcache/windows/Python/3.8.3/x64/pythonw.exe
... More context before calling cmake, >>> python3 -V
Python 3.8.3
>>> pip3 list
Package Version
---------- -------
numpy 1.23.5
pip 22.3.1
setuptools 41.2.0 |
Beta Was this translation helpful? Give feedback.
-
I guess vcpkg can find python that python installs. It just doesn't provide the numpy component you ask for. |
Beta Was this translation helpful? Give feedback.
-
Any workaround on this? Manually install numpy and manually find and link it? |
Beta Was this translation helpful? Give feedback.
-
Not familiar with vcpkg or the Windows directory structures, but Just making a note that once installed it should be reasonably simple to detect where the library file is (it should be in the site-packages right next to the library). On a Debian install it is
Cmake can be made to rely on this. E.g. https://github.com/casacore/casacore/blob/master/cmake/FindNUMPY.cmake#LL54C1-L54C67 |
Beta Was this translation helpful? Give feedback.
-
Hi, I have another similar problem. I have both vcpkg and conda, but CMake always use vcpkg's python, which can not find numpy in conda environment. I try to use Python3_ROOT_DIR to specify it manually but not work. Do you have any idea with it? |
Beta Was this translation helpful? Give feedback.
-
Describe the bug
vcpkg cannot find python that vcpkg installed.
Environment
To Reproduce
vcpkg.json
CMakeLists.txt
Expected behavior
cmake finds the python installed by vcpkg.
Failure logs
Additional context
Alternatives tried
Set PATH to system installation of Python,
Failed in the same way.
Beta Was this translation helpful? Give feedback.
All reactions