繁体   English   中英

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

[英]Running CMAKE couldn't find python executable

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

应用版本:CURA 3.6 版本

平台:

  • 处理器:Intel(R) Core(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-build 存储库,并将构建目录指向 build 子目录。

实际结果

D:\work\cura-build-master\cura-build-master\build>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-master\\install_dir\\bin

我已经检查并发现我们可以设置python可执行文件:

对于 Windows:设置(Python3_EXECUTABLE D:/cura-build-environment-master/install_dir/bin/python.exe)

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM