-
-
Save xunkai55/6331fdd3446257cf5b4a98f202727245 to your computer and use it in GitHub Desktop.
# Do not excute the script directly. It is just for demonstration. | |
# If you followed the documentation and got the errors below, please take a look at this guide. | |
# Color management: using fallback mode for management | |
# bpy: couldnt find 'scripts/modules', blender probably wont start. | |
# Freestyle: couldn't find 'scripts/freestyle/modules', Freestyle won't work properly. | |
# ImportError: No module named 'bpy_types' | |
# ImportError: No module named 'bpy_types' | |
# pyrna_srna_ExternalType: failed to find 'bpy_types' module | |
# ImportError: No module named 'bpy_types' | |
# ImportError: No module named 'bpy_types' | |
# pyrna_srna_ExternalType: failed to find 'bpy_types' module | |
# ImportError: No module named 'bpy_types' | |
# pyrna_srna_ExternalType: failed to find 'bpy_types' module | |
# F0102 21:06:58.742173 1895752448 utilities.cc:322] Check failed: !IsGoogleLoggingInitialized() You called InitGoogleLogging() twice! | |
# " | |
# Firstly, download the source and excute "make bpy" things. | |
cd $THE_FOLDER_YOU_BUILD/bin | |
# Now you should find bpy.so and 2.xx directory here. | |
# If you type python3 and `import bpy` here, you would get the error messages above. | |
# Don't worry. | |
mkdir ../Resources | |
mv 2.78 ../Resources/ | |
# Change the version number if is out of date. | |
# Try the test script. It could be good now. | |
python3 -c "import bpy ; bpy.ops.render.render(write_still=True)" | |
# Of course, if you want to setup bpy in somewhere else, | |
# you have to do something just like `mkdir ../Resources; mv 2.78 ../Resources`. |
thanks,it works!
@kabukunz I'm having the issue as described in this gist but even changing to ../config-3.7m-darwin
in the middle and somehow make bpy
changes back to config-3.7m
and the error comes back. Any thoughts?
ld: warning: directory not found for option '-L/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/config-3.7m'
@kabukunz Any ideas how to configure the make system to use non system python for bpy?
I have a number of python virtual environment that I manage through pyenv and I would like to use "$HOME/.pyenv/versions/3.7.2" instead of the "/Library/Frameworks/Python.framework/Versions/3.7/Python" that the make system looks for by default. I searched quite a bit, but couldn't find where this path is defined and how to change it?
I tried editing the build_files/config/bpy_module.cmake to update lines 10-11 to read as
set(WITH_INSTALL_PORTABLE ON CACHE BOOL "" FORCE)
set(CMAKE_INSTALL_PREFIX "${HOME}/.pyenv/versions/3.7.2")
However, my compilation still fails with an error:
clang: error: no such file or directory: '/Library/Frameworks/Python.framework/Versions/3.7/Python'
make[2]: *** [bin/makesdna] Error 1
make[1]: *** [source/blender/makesdna/intern/CMakeFiles/makesdna.dir/all] Error 2
make: *** [all] Error 2
Same here. Two approach:
- symlink pyenv in your home from Application/Library/Frameworks/Python
- reinstall pyenv environment with Framework option (better, it did the above for you)
No easy usage otherwise. Default python for mac is in Frameworks, all apps looks for it there.
@kabukunz I'm having the issue as described in this gist but even changing to
../config-3.7m-darwin
in the middle and somehowmake bpy
changes back toconfig-3.7m
and the error comes back. Any thoughts?ld: warning: directory not found for option '-L/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/config-3.7m'
Did anyone find a solution to this error?
@gandarez @kabukunz @sanketdiwale
@Gaurav1302, I tried the solution here to no avail, and then I also tried renaming the folder to config-3.7m (removing the darwin suffix), and still ended up with the same errors:
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [bin/bpy.so] Error 1
make[2]: *** [source/creator/CMakeFiles/blender.dir/all] Error 2
make[1]: *** [all] Error 2
make: *** [all] Error 2
@m-clare, I couldn't make this work on a Mac. So, I dual-booted my PC to Linux (Ubuntu) and it worked perfectly for me. It was much easier to use Blender over a Linux system. I suggest you switch to a Linux system instead of trying to figure out a way to make it work on a Mac. I assure you, it's much simpler.
@Gaurav1302, How did you install bpy in Ubuntu? I have Ubuntu 18.04 with python 3.7. I have tried several methods, still not able to do so correctly. Can you help me out here?
I attempted this yet received the same error described.
I have a few more tests to do once I get back home; could someone describe what the final environment looks like?
would it be something like:
or: