CMAKE ищет python в неправильной папке - PullRequest
0 голосов
/ 06 марта 2020

Я пытаюсь собрать 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 в неправильном каталоге, как мой был установлен homebrew на / user / local /

Как мне изменить путь? Я попытался: export PYTHONPATH=/user/local/bin на .bash_profile, но не сработало.

Спасибо

Ответы [ 2 ]

1 голос
/ 06 марта 2020

Предположим, вы используете последний Find Python модуль.

Посмотрите на HINT секцию

Python_ROOT_DIR Определите каталог root Python установки

sr c: https://cmake.org/cmake/help/git-stage/module/FindPython.html#hints

0 голосов
/ 06 марта 2020

Я закончил тем, что создал символическую ссылку

ln -s origin_path destination_path

из Python .framework, и это сработало

...