Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BlenderScriptsDirUnknownError when bpy_post_install on MacoOS #89

Open
diemort opened this issue Apr 14, 2021 · 0 comments
Open

BlenderScriptsDirUnknownError when bpy_post_install on MacoOS #89

diemort opened this issue Apr 14, 2021 · 0 comments

Comments

@diemort
Copy link

diemort commented Apr 14, 2021

Describe the bug
Same error as found in #41

raceback (most recent call last):
  File "/usr/local/bin/bpy_post_install", line 11, in <module>
    sys.exit(post_install())
  File "/usr/local/lib/python3.7/site-packages/blenderpy/post_install.py", line 47, in post_install
    install_scripts_directory()
  File "/usr/local/lib/python3.7/site-packages/blenderpy/post_install.py", line 43, in install_scripts_directory
    +blender_scripts_search_root_dir)
blenderpy.BlenderScriptsDirUnknownError: Could not find Blender scripts directory in /usr/local/opt

To Reproduce
pip3 install bpy-2.91a0-cp37-cp37m-macosx_10_13_x86_64.whl && bpy_post_install

[email protected] installed via brew

>>> import sys
>>> sys.executable
'/usr/local/opt/[email protected]/bin/python3.7'

blender installed via brew
/usr/local/Caskroom/blender/2.92.0/
with scripts at:
/usr/local/Caskroom/blender/2.92.0/Blender.app/Contents/Resources/2.92/scripts/
and not at
/usr/local/opt/

More error code below after testing a short code.

Expected behavior
Clear success in post installation step.

Desktop (please complete the following information):

  • OS: MacOS Catalina 10.15.7
  • No Xcode neither command line tools.

Additional context
Before removing command line tools I tried:
python3 -m pip install bpy
but after long minutes it fails after skipping the CXX flag with:
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
and found no way to properly link the c++ compiler. After deleting '/Library/Developer/CommandLineTools' cmake fails to find c++ compiler, even though it is at /usr/bin.

Short test code
A test with a test code results in the following error, possibly because post_install did not succeed:

Color management: using fallback mode for management
Color management: Error could not find role data role.
BLT_lang_init: 'locale' data path for translations not found, continuing
Color management: scene view "Filmic" not found, setting default "Standard".
blf_load_font_default: 'fonts' data path not found for 'droidsans.ttf', will not be able to display text
blf_load_font_default: 'fonts' data path not found for 'bmonofont-i18n.ttf', will not be able to display text
blf_load_font_default: 'fonts' data path not found for 'bmonofont-i18n.ttf', will not be able to display text
bpy: couldn't find 'scripts/modules', blender probably wont start.
Freestyle: couldn't find 'scripts/freestyle/modules', Freestyle won't work properly.
ModuleNotFoundError: No module named 'bpy_types'
ModuleNotFoundError: No module named 'bpy_types'
ERROR (bpy.rna): /Users/tylergubala/Code/Python/blenderpy/Blender/blender/source/blender/python/intern/bpy_rna.c:7241 pyrna_srna_ExternalType: failed to find 'bpy_types' module
ModuleNotFoundError: No module named 'bpy_types'
ModuleNotFoundError: No module named 'bpy_types'
ERROR (bpy.rna): /Users/tylergubala/Code/Python/blenderpy/Blender/blender/source/blender/python/intern/bpy_rna.c:7241 pyrna_srna_ExternalType: failed to find 'bpy_types' module
ModuleNotFoundError: No module named 'bpy_types'
ERROR (bpy.rna): /Users/tylergubala/Code/Python/blenderpy/Blender/blender/source/blender/python/intern/bpy_rna.c:7241 pyrna_srna_ExternalType: failed to find 'bpy_types' module
ModuleNotFoundError: No module named 'bpy_types'
ERROR (bpy.rna): /Users/tylergubala/Code/Python/blenderpy/Blender/blender/source/blender/python/intern/bpy_rna.c:7241 pyrna_srna_ExternalType: failed to find 'bpy_types' module
ModuleNotFoundError: No module named 'bpy_types'
ERROR (bpy.rna): /Users/tylergubala/Code/Python/blenderpy/Blender/blender/source/blender/python/intern/bpy_rna.c:7241 pyrna_srna_ExternalType: failed to find 'bpy_types' module
ModuleNotFoundError: No module named 'bpy_types'
ERROR (bpy.rna): /Users/tylergubala/Code/Python/blenderpy/Blender/blender/source/blender/python/intern/bpy_rna.c:7241 pyrna_srna_ExternalType: failed to find 'bpy_types' module
ModuleNotFoundError: No module named 'bpy_types'
ERROR (bpy.rna): /Users/tylergubala/Code/Python/blenderpy/Blender/blender/source/blender/python/intern/bpy_rna.c:7241 pyrna_srna_ExternalType: failed to find 'bpy_types' module
F0414 21:58:16.315747 257584576 utilities.cc:346] Check failed: !IsGoogleLoggingInitialized() You called InitGoogleLogging() twice!
*** Check failure stack trace: ***
    @        0x111fad91f  google::LogMessageFatal::~LogMessageFatal()
    @        0x111fa9be9  google::LogMessageFatal::~LogMessageFatal()
    @        0x111fb297c  google::glog_internal_namespace_::InitGoogleLoggingUtilities()
    @        0x1105b440e  libmv_initLogging
    @        0x10f721be2  main_python_enter
    @        0x110071b87  dealloc_obj_dealloc
    @        0x10a460c5c  insertdict
    @        0x10a463d20  PyDict_SetItemString
    @        0x10a4f07a6  PyModule_AddObject
    @        0x10a4ed191  _PyImport_LoadDynamicModuleWithSpec
    @        0x10a4ecaa5  _imp_create_dynamic
    @        0x10a44181d  _PyMethodDef_RawFastCallDict
    @        0x10a440e23  _PyCFunction_FastCallDict
    @        0x10a4d45ba  _PyEval_EvalFrameDefault
    @        0x10a4d750f  _PyEval_EvalCodeWithName
    @        0x10a441132  _PyFunction_FastCallKeywords
    @        0x10a4d6c76  call_function
    @        0x10a4d41e1  _PyEval_EvalFrameDefault
    @        0x10a44153e  function_code_fastcall
    @        0x10a4d6c76  call_function
    @        0x10a4d41c8  _PyEval_EvalFrameDefault
    @        0x10a44153e  function_code_fastcall
    @        0x10a4d6c76  call_function
    @        0x10a4d4288  _PyEval_EvalFrameDefault
    @        0x10a44153e  function_code_fastcall
    @        0x10a4d6c76  call_function
    @        0x10a4d4288  _PyEval_EvalFrameDefault
    @        0x10a44153e  function_code_fastcall
    @        0x10a4d6c76  call_function
    @        0x10a4d4288  _PyEval_EvalFrameDefault
    @        0x10a44153e  function_code_fastcall
    @        0x10a4428f8  object_vacall
Abort trap: 6

UPDATE #1
Just to confirm that the same error occurs even with command line tools installed.

UPDATE #2
Following #86 : adding followlinks=True in init.py did not solve the problem. For some reason python is not following the link to brew blender:
/usr/local/bin/blender -> /usr/local/Caskroom/blender/2.92.0/blender.wrapper.sh
which is outside /opt of python:
/usr/local/opt/[email protected]/bin/python3.7
and may be the reason that init.py does not find the proper path. I only managed to make it work after defining:
blender_scripts_current_dir = "/usr/local/Caskroom/blender/2.92.0/Blender.app/Contents/Resources/2.92/scripts/"
in post_install.py (dirty edit).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant