[英]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.