运行 CMAKE 找不到 python 可执行文件



github中提出问题的链接:供参考的github问题链接

应用程序版本:CURA 3.6版

平台:

  • 处理器:英特尔(R(酷睿(TM(i5-8300H CPU@2.30 GHz
  • 内存:16.0 GB
  • 系统类型:64位操作系统,基于x64的处理器

复制步骤

我正在尝试从https://github.com/Ultimaker/Cura/wiki/Running-Cura-from-Source-on-Windows#microsoft-visual-studio-2019。并尝试运行步骤10。10:

打开CMake,将其源目录指向cura构建存储库,将构建目录指向构建子目录。

实际结果

D:workcura-build-mastercura-build-masterbuild>cmake -DCMAKE_INSTALL_PREFIX=../install_dir -DCMAKE_BUILD_TYPE=Release -G "NMake Makefiles" ..
-- The C compiler identification is MSVC 19.0.24215.1
-- The CXX compiler identification is MSVC 19.0.24215.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: D:/MicrosoftVisualStudio14.0/VC/bin/amd64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: D:/MicrosoftVisualStudio14.0/VC/bin/amd64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at C:/Program Files/CMake/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:165 (message):
Could NOT find Python3 (missing: Python3_EXECUTABLE Interpreter)
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:458 (_FPHSA_FAILURE_MESSAGE)
C:/Program Files/CMake/share/cmake-3.18/Modules/FindPython/Support.cmake:2966 (find_package_handle_standard_args)
C:/Program Files/CMake/share/cmake-3.18/Modules/FindPython3.cmake:389 (include)
CMakeLists.txt:94 (find_package)
-- Configuring incomplete, errors occurred!
See also "D:/work/cura-build-master/cura-build-master/build/CMakeFiles/CMakeOutput.log".

预期结果

CMake应该生成构建目录中的所有文件。

从上述错误中可以明显看出,CMake无法找到python可执行文件。

我没有在系统上安装python。唯一可用的python来自CURA(在构建cura-build-environment时安装(。如何链接或使CMake找到已安装的python可执行文件?

就我的情况而言,它已安装/在该文件夹中找到可执行文件:cura-build-environment-masterinstall_dirbin

我检查过,发现我们可以设置python可执行文件:

对于窗口:set(Python3_EXECUTABLE D:/cura构建环境master/install_dir/bin/python.exe(

最新更新