Python version error appears when trying to build kicad in Windows MSVC

I am trying to build kicad x64-debug/release version in Window MSVC enviroment, but met this error as below:

Error CMake Error at C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find PythonLibs: Found unsuitable version “3.5.0”, but required
is at least “3.6” (found
optimized;D:/src/EDA/kicad/kicad-source-mirror/build/x64-Debug/vcpkg_installed/x64-windows/lib/python39.lib;debug;D:/src/EDA/kicad/kicad-source-mirror/build/x64-Debug/vcpkg_installed/x64-windows/debug/lib/python39_d.lib) C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake 230

I have an installed python with version 3.10.4 in my c: drive, meanwhile the build script will download another verison 3.9.10 of python into the kicad source folder D:/src/EDA/kicad/kicad-source-mirror/build/x64-Debug/vcpkg_installed/x64-windows/tools/python3/python.exe.
None of them is version 3.5, so I am confused where the building script find PythonLibs 3.5?

It tells you that it has found 3.9 dlls but for some reason thinks it’s 3.5.
I have no idea why. @marekr ?

anyone can help?
really needs your help~

I’d suggest to try to override the PATH variable in CMakeSettings.json, and if you encounter an error about

Provided 'inheritEnvironments' doesn't provide the necessary environment variables needed to set the context for the configuration x64-Release. You can work around this by adding the necessary environment variables such as INCLUDE, LIBPATH, PATH and others to an environment block in your CMakeSettings.json.

then LIB , LIBPATH , INCLUDE too.

See Msvc/vcpkg changes - #48 by dsa-t

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.