[BlenderBIM] "No module named 'shapely.lib' error while installing addon

Hi everone, i have been having this problem for a while now. When I try to install BB i get the following error:

  File "/home/xxx/.config/blender/3.6/scripts/addons/blenderbim/libs/site/packages/shapely/__init__.py", line 1, in <module>
    from .lib import GEOSException  # NOQA
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named 'shapely.lib'

When I look at the aformentioned folder, I see that there is a file called "lib.cpython-310-x86_64-linux-gnu.so". I tried to copy that as "lib.so" and then I get the following error:

  File "/home/xxx/.config/blender/3.6/scripts/addons/blenderbim/libs/site/packages/shapely/__init__.py", line 6, in <module>
    from ._geometry import *  # NOQA
    ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/xxx/.config/blender/3.6/scripts/addons/blenderbim/libs/site/packages/shapely/_geometry.py", line 6, in <module>
    from . import _geometry_helpers, geos_version, lib
ImportError: cannot import name '_geometry_helpers' from partially initialized module 'shapely' (most likely due to a circular import) (/home/xxx/.config/blender/3.6/scripts/addons/blenderbim/libs/site/packages/shapely/__init__.py)

Then I see a file called "_geometry_helpers.cpython-310-x86_64-linux-gnu.so" and when I tried to copy that as "_geometry_helpser.so" Blender crashes and throws this error:

<frozen importlib._bootstrap>:241: RuntimeWarning: compiletime version 3.10 of module 'shapely._geometry_helpers' does not match runtime version 3.11
Writing: /tmp/blender.crash.txt
Segmentation fault

I'm on Void Linux and the system's python version is indeed 3.11:

>>> print(sys.version_info)
sys.version_info(major=3, minor=11, micro=4, releselevel='final', serial=0)

Am I doing something wrong? I don't get this error on Windows and Blender 3.6.

Comments

  • Are you using blender downloaded from blender.org or are you using the blender that comes with your distribution? The latter will be linked to python 3.11, so the blenderbim zip won't work here (the zip is built for 3.10).

  • @brunopostle thanks, the version from blender.org does work. But isn't it counterintuitive that we need the version from blender.org? I have to manually keep the version up-to-date, as opposed to installing the version from my distro's repositories. Or is there an easy way that I can compile BB with python3.11?

  • @atomkarinca because we're a bit strapped on developer resources a call was made to only support certain platforms officially: https://blenderbim.org/docs/devs/system_support.html

    There is no "easy way" to compile BB with Python 3.11. You could swap out the Python 3.11 binaries for IfcOpenShell (https://blenderbim.org/docs-python/ifcopenshell-python/installation.html#from-source-with-precompiled-binaries) however keep in mind that BBIM uses more than just IfcOpenShell, it has other dependencies which are also Python version specific and it's not exactly an easy effort to maintain them all.

  • @Moult ok, thanks. So for now I should use the official Blender packages till BB python version is bumped up to 3.11.

  • @atomkarinca You can use the Snap or Flathub versions and get easy updates. I'm using the Flathub version with no problems.

  • @Zizico2 thanks for the suggestion, but I guess I have become enough of an old fart that I don't like "those flathub types" :) I don't need cutting edge versions of Blender per se, but I am keeping BlenderBIM updated through git.

Sign In or Register to comment.