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/
如何更改路径?我在 .bash_profile
上试过:export PYTHONPATH=/user/local/bin
但没用。
谢谢
假设您正在使用最后一个 FindPython 模块。
查看提示部分
Python_ROOT_DIR
Define the root directory of a Python installation
来源:https://cmake.org/cmake/help/git-stage/module/FindPython.html#hints
我最终创建了一个符号链接
ln -s origin_path destination_path
的 Python.framework 有效
我正在尝试将 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/
如何更改路径?我在 .bash_profile
上试过:export PYTHONPATH=/user/local/bin
但没用。
谢谢
假设您正在使用最后一个 FindPython 模块。
查看提示部分
Python_ROOT_DIR
Define the root directory of a Python installation
来源:https://cmake.org/cmake/help/git-stage/module/FindPython.html#hints
我最终创建了一个符号链接
ln -s origin_path destination_path
的 Python.framework 有效