u3dreal / molecular-plus

particle solver for Blender 3.0+ / 4.0+
GNU General Public License v3.0
261 stars 19 forks source link

Missing core module when enabling addon v1.14.1 on Linux #46

Closed peter-vasut closed 8 months ago

peter-vasut commented 8 months ago

Hello, I get following message when trying to enable the add-on:

Traceback (most recent call last):
  File "/usr/share/blender/4.0/scripts/modules/addon_utils.py", line 401, in enable
    mod.register()
  File "/home/peter/.config/blender/4.0/scripts/addons/molecularplus/__init__.py", line 39, in register
    from . import properties, ui, operators, creators, addon_prefrences
  File "/home/peter/.config/blender/4.0/scripts/addons/molecularplus/operators.py", line 10, in <module>
    from . import simulate, core
ImportError: cannot import name 'core' from 'molecularplus' (/home/peter/.config/blender/4.0/scripts/addons/molecularplus/__init__.py)

I'm running blender 4.0.2 which includes Python version 3.11.6.

Issue appears to be that the binary core module can't be imported for some reason. I don't know how the linking of compiled code and python works, so this is all the info I could provide.

u3dreal commented 8 months ago

Hi you are literally the first one using it on linux for a long time .. so i will have to check on linux . The python version should not be an issue since it run on windows and macos .. So have to update my linux and check haven't done that for a while ..

u3dreal commented 8 months ago

"I'm running blender 4.0.2 which includes Python version 3.11.6." official Blender has 3.10.13 for python.

You will have to compile molecular against python 3.11 yourself.

Just tetsed on ubuntu 20.4 and all works as expected.

Miner34dev commented 2 months ago

It's back. Addon version 1.15.5 for python 3.11, blender 4.1.1 (from arch repos).

Exception in module register(): /home/miner34/.config/blender/4.1/scripts/addons/molecularplus/__init__.py
Traceback (most recent call last):
File "/usr/share/blender/4.1/scripts/modules/addon_utils.py", line 444, in enable
mod.register()
File "/home/miner34/.config/blender/4.1/scripts/addons/molecularplus/__init__.py", line 39, in register
from . import properties, ui, operators, creators, addon_prefrences
File "/home/miner34/.config/blender/4.1/scripts/addons/molecularplus/operators.py", line 9, in <module>
from . import simulate, core
ImportError: cannot import name 'core' from 'molecularplus' (/home/miner34/.config/blender/4.1/scripts/addons/molecularplus/__init__.py)
u3dreal commented 2 months ago

Probably a Problem between arch linux and ubuntu ( used to compile Molecular ) You might have to compile molecular yourself. check the github action for instruction. Works as expected on ubuntu.

Miner34dev commented 1 month ago

I can't compile it! I think this might be helpful: Screenshot_20240717_201555 You see, the Python version is 3.12.4! Apparently, the arch package is modified to use the system version of Python.

u3dreal commented 1 month ago

Seems your Blender has been compiled with python 3.12.4 .. so just use Blender from original site blender.org