Closed EnigmaticCat123 closed 9 months ago
Hi, Using a custom mitsuba build with blender is very brittle (particularly under windows), and I haven't had time to get to the bottom of this. Normally, compiling mitsuba with the same minor version of python as blender uses should be enough. The error you get is the one typically thrown because of such mismatches, but it seems you used the right version of python.
That said, unless you plan on modifying the addon yourself, using the pip-installed version of mitsuba should work more reliably (though there are also issues on Windows there...)
It seems that changes introduced in Blender 3.5 have broken the import of mitsuba from python's blender. Versions up to 3.4 work fine on my end, using both a custom build or the pip-installed version. I suggest you downgrade your version of blender while we investigate this issue. In order for blender to be able to load mitsube in these versions, you may need to launch it from a command prompt, with the --python-use-system-env
flag.
Hello, I am experiencing the same issue. When I was on version 3.5 I got the above error, in the same sequence as issue #57. After downgrading from Blender 3.5 to 3.4.1 though, I am still unable to install the plugin.
I am able to get the package to show in the package manager, but when I hit the checkbox, it lags for a couple seconds and then announces that it failed to load the package.
Did you launch blender using the --python-use-system-env
flag ?
Ah wonderful, launching blender with --python-use-system-env
flag worked great on blender version 3.4.1 for me. Thanks for the help!
launch blender using the
--python-use-system-env
flag
How to lunch blender using this --python-use-system-env
flag? I'm using win 10
okay , well thanks but how can I lunch blender using this --python-use-system-env flag? I'm using win 10
@AbdolvakilFazli Here's a way to do it.
Open a command line prompt: press Windows + R, write cmd
, press enter.
In the terminal, paste:
"C:\Program Files\Blender Foundation\Blender 3.5\blender.exe" --python-use-system-env
and press enter. You might have to tweak depending on your install path.
@merlinND @bathal1 Thank you very much. I had to downgrade to 3.4.1 too and now using your help everything is fine.
This should now be fixed with the latest release of the add-on. Please upgrade and re-open this issue if the problem persists.
Bug Description I'm using a custom build of mitsuba, following the instructions here.. After specifying the custom mitsuba path, I get the error "The 'mitsuba' native modules could not be imported.". Digging further, I tried importing mitsuba using blender's python exe, which worked without problems. However, when the trying to import mitsuba in blender's build-in console, i get the full error:
So blender obviously seems to find mitsuba_ext, as it gives a different error if I try to import a non-existing module with the same function. I've narrowed down that mitsuba_ext is "mitsuba_ext.cp310-win_amd64.pyd". Explicitly importing that specific file works without any problem using blender's python exe, but inside the blender terminal, i get the same "ImportError: The 'mitsuba' native modules could not be imported. ".
So it seems that the root cause is that somehow mitsuba_ext.cp310-win_amd64.pyd is imported differently inside of blender compared to blender's python exe run in cmd. If needed, I can send my build of mitsuba. Thanks for any help!
If this doesn't belong here, should I ask the blender or mitsuba guys for help?
Environment (please complete the following information):