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

2024-05-29 06:42:26 发布

您现在位置:Python中文网/ 问答频道 /正文

github中提出的问题的链接:github issue link for reference

应用版本:CURA 3.6版本

站台:

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

复制步骤

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

Open CMake and point its source directory to your cura-build repository and the build directory to the build subdirectory.

实际结果

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


Tags: buildinfomastercmakecompilercxxfilesprogram
1条回答
网友
1楼 · 发布于 2024-05-29 06:42:26

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

对于windows: set(Python3\u可执行文件D:/cura build environment master/install\u dir/bin/python.exe)

相关问题 更多 >

    热门问题