Badjano
Badjano

Reputation: 416

CMAKE is looking for python on the wrong folder

I'm trying to build blender as a python module ( make bpy ) and I´m getting this error

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

It seems it is looking for python in the wrong directory, as mine was installed by homebrew on /user/local/

How do I change the path? I tried:export PYTHONPATH=/user/local/bin on .bash_profile but didn´t work.

Thanks

Upvotes: 2

Views: 4657

Answers (2)

Badjano
Badjano

Reputation: 416

I ended up making a symlink

ln -s origin_path destination_path

of Python.framework and it worked

Upvotes: 0

Mizux
Mizux

Reputation: 9301

Supposing you are using the last FindPython module.

Look at the HINT section

Python_ROOT_DIR Define the root directory of a Python installation

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

Upvotes: 1

Related Questions