i have the problem that i’ve build cpython on my own in /home/stuv/build/cpython and i set CMAKE_PREFIX_PATH to this path but when i try
find_package(
Python3
REQUIRED VERSION 3.13
COMPONENTS Development
)
he tells me he can only find the version 3.11 which is the system installed one. is there a way i can tell cmake which version i wold prefer or why he doesn’t he find my version from the build dir ?
i’ve done so now with --prefix and put the builded version into /home/user/build/python3.13 and my code looks like:
cmake_minimum_required(VERSION 3.5)
project(TestPython)
i now get the output:
CMake Error at /usr/local/share/cmake-3.28/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find Python3 (missing: PATH /home/stuv/build/python3.13) (found
suitable version “3.13.0”, minimum required is “3.13.0”)
Call Stack (most recent call first):
/usr/local/share/cmake-3.28/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
/usr/local/share/cmake-3.28/Modules/FindPython/Support.cmake:3867 (find_package_handle_standard_args)
/usr/local/share/cmake-3.28/Modules/FindPython3.cmake:545 (include)
CMakeLists.txt:56 (find_package)
so it looks like he can find the version but has some othe trouble, i set Python_DIR to /home/user/build/python3.13