繁体   English   中英

CMAKE 正在错误的文件夹中寻找 python

[英]CMAKE is looking for python on the wrong folder

我正在尝试将 Blender 构建为 python 模块( make bpy ),但出现此错误

Configuring Blender in "/Volumes/2Tb/Projects/Blender/build_darwin_bpy" ...
loading initial cache file /Volumes/2Tb/Projects/Blender/blender/build_files/cmake/config/bpy_module.cmake
-- Detected OS X 10.15 and Xcode 11. at /Applications/Xcode.app
-- OSX_SYSROOT_PREFIX: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform
CMake Error at build_files/cmake/platform/platform_apple.cmake:124 (message):
  Python executable missing:
  /Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7m
Call Stack (most recent call first):
  CMakeLists.txt:817 (include)


-- Configuring incomplete, errors occurred!
See also "/Users/queen/Projects/Blender/build_darwin_bpy/CMakeFiles/CMakeOutput.log".
make: *** [all] Error 1

似乎它在错误的目录中寻找 python,因为我的是由自制软件安装在 /user/local/

如何更改路径? 我试过: export PYTHONPATH=/user/local/bin on .bash_profile但没有用。

谢谢

假设您正在使用最后一个FindPython模块。

查看提示部分

Python_ROOT_DIR定义 Python 安装的根目录

源代码: https : //cmake.org/cmake/help/git-stage/module/FindPython.html#hints

我最终做了一个符号链接

ln -s origin_path destination_path

Python.framework 并且它起作用了

暂无
暂无

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

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