mitsuba-renderer/mitsuba-blender

<Mitsuba blender add on error>: <Cannot install Mitsuba add-on in blender>

Pooja-M9 opened this issue · 15 comments

Cannot install mitsuba add on for blender

Bug Description
While trying to install mitsuba add-on in blender, i am getting following error:

Read prefs: C:\Users\MOH80574\AppData\Roaming\Blender Foundation\Blender\3.5\config\userpref.blend
Exception in module register(): C:\Users\MOH80574\AppData\Roaming\Blender Foundation\Blender\3.5\scripts\addons\mitsuba-blender_init_.py
Traceback (most recent call last):
File "C:\Program Files\Blender Foundation\Blender 3.5\3.5\python\lib\site-packages\mitsuba_init_.py", line 49, in
import('mitsuba.mitsuba_ext')
File "C:\Program Files\Blender Foundation\Blender 3.5\3.5\python\lib\importlib_init
.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 674, in _load_unlocked
File "", line 571, in module_from_spec
File "", line 1176, in create_module
File "", line 241, in _call_with_frames_removed
ImportError: DLL load failed while importing mitsuba_ext: The specified procedure could not be found.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "C:\Program Files\Blender Foundation\Blender 3.5\3.5\scripts\modules\addon_utils.py", line 369, in enable
mod.register()
File "C:\Users\MOH80574\AppData\Roaming\Blender Foundation\Blender\3.5\scripts\addons\mitsuba-blender_init_.py", line 301, in register
if try_register_mitsuba(context):
File "C:\Users\MOH80574\AppData\Roaming\Blender Foundation\Blender\3.5\scripts\addons\mitsuba-blender_init_.py", line 55, in try_register_mitsuba
could_init_mitsuba = init_mitsuba(context)
File "C:\Users\MOH80574\AppData\Roaming\Blender Foundation\Blender\3.5\scripts\addons\mitsuba-blender_init_.py", line 35, in init_mitsuba
import mitsuba
File "C:\Program Files\Blender Foundation\Blender 3.5\3.5\python\lib\site-packages\mitsuba_init_.py", line 69, in
raise exc
ImportError: The 'mitsuba' native modules could not be imported. You're likely trying to use Mitsuba within a Python binary (C:\Program Files\Blender Foundation\Blender 3.5\3.5\python\bin\python.exe) that is different from the one for which the native module was compiled (C:\Users\runneradmin\AppData\Local\Temp\cibw-run-rwptb42b\cp310-win_amd64\build\venv\Scripts\python.exe).

To Reproduce
Steps to reproduce the behavior:

  1. Download blender and mitsuba add on from these two links - https://www.blender.org/download/releases/3-5/ and https://github.com/mitsuba-renderer/mitsuba-blender
  2. Open blender and click on edit -> preferences -> install -> mitsuba zip file
  3. Error is popped up when activating the add-on

Expected behavior
While activating, mitsuba add-on should be activated without any issue

Environment (please complete the following information):

  • OS: [Windows]
  • Blender Version: [3.5]
  • Add-on Version: [latest]

Did you try to link the addon to a local installation of Mitsuba, or did you install it with pip through blender ?

I dont have Mitsuba installed locally. Steps i followed are:

  1. Installed Blender 3.5
  2. Downloaded zip file of Mitsuba Blender add on from here https://github.com/mitsuba-renderer/mitsuba-blender
  3. Inside Blender add-on option, i clicked on 'Install' and uploaded zip file of mitsuba downloaded in previous step.

Is there something else i should have downloaded for this to work? Sorry i am not experienced with Blender or mitsuba.

Did you download the mitsuba-blender.zip file from the Releases page ?

The addon does not have a field for a mitsuba zip file. You can either let blender's python install mitsuba through pip by clicking on Install dependencies (I recommend doing that) or point to a local mitsuba build folder in Advanced settings

I have downloaded mitsuba-blender.zip file from the Releases page.

image

Install dependencies is somehow not working for me (that option is disabled) - i have attached in figure. Could you tell me where would be the location of local mitsuba build folder? Is it the zip file location?

Could you try reinstalling the addon from scratch, and see if the option is available then ? To uninstall the addon, click on "remove". You can then reload blender and install the addon from the zip file as you did before.

I have removed the zip file and then reinstalled it again. Now i cant see the dependencies option at all.
image

You did not activate the addon. You need to tick the checkbox next to the addon's name.

When i click on the activate button, error pops up as i showed before -
image

Can you please copy the full error log here? You should be able to find it in the console output. You will likely first need to toggle the console : Window -> Toggle System Console. If there is no error message, you might need to redo the addon instal procedure to trigger it.

Hello,

I have copied the full error log as you advised:

Read prefs: C:\Users\MOH80574\AppData\Roaming\Blender Foundation\Blender\3.5\config\userpref.blend
Exception in module register(): C:\Users\MOH80574\AppData\Roaming\Blender Foundation\Blender\3.5\scripts\addons\mitsuba-blender_init_.py
Traceback (most recent call last):
File "C:\Program Files\Blender Foundation\Blender 3.5\3.5\python\lib\site-packages\mitsuba_init_.py", line 49, in
import('mitsuba.mitsuba_ext')
File "C:\Program Files\Blender Foundation\Blender 3.5\3.5\python\lib\importlib_init
.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 674, in _load_unlocked
File "", line 571, in module_from_spec
File "", line 1176, in create_module
File "", line 241, in _call_with_frames_removed
ImportError: DLL load failed while importing mitsuba_ext: The specified procedure could not be found.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "C:\Program Files\Blender Foundation\Blender 3.5\3.5\scripts\modules\addon_utils.py", line 369, in enable
mod.register()
File "C:\Users\MOH80574\AppData\Roaming\Blender Foundation\Blender\3.5\scripts\addons\mitsuba-blender_init_.py", line 301, in register
if try_register_mitsuba(context):
File "C:\Users\MOH80574\AppData\Roaming\Blender Foundation\Blender\3.5\scripts\addons\mitsuba-blender_init_.py", line 67, in try_register_mitsuba
could_init_mitsuba = init_mitsuba(context)
File "C:\Users\MOH80574\AppData\Roaming\Blender Foundation\Blender\3.5\scripts\addons\mitsuba-blender_init_.py", line 35, in init_mitsuba
import mitsuba
File "C:\Program Files\Blender Foundation\Blender 3.5\3.5\python\lib\site-packages\mitsuba_init_.py", line 69, in
raise exc
ImportError: The 'mitsuba' native modules could not be imported. You're likely trying to use Mitsuba within a Python binary (C:\Program Files\Blender Foundation\Blender 3.5\3.5\python\bin\python.exe) that is different from the one for which the native module was compiled (C:\Users\runneradmin\AppData\Local\Temp\cibw-run-rwptb42b\cp310-win_amd64\build\venv\Scripts\python.exe).

Exception in module register(): C:\Users\MOH80574\AppData\Roaming\Blender Foundation\Blender\3.5\scripts\addons\mitsuba-blender_init_.py
Traceback (most recent call last):
File "C:\Program Files\Blender Foundation\Blender 3.5\3.5\python\lib\site-packages\mitsuba_init_.py", line 49, in
import('mitsuba.mitsuba_ext')
File "C:\Program Files\Blender Foundation\Blender 3.5\3.5\python\lib\importlib_init
.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 674, in _load_unlocked
File "", line 571, in module_from_spec
File "", line 1176, in create_module
File "", line 241, in _call_with_frames_removed
ImportError: DLL load failed while importing mitsuba_ext: The specified procedure could not be found.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "C:\Program Files\Blender Foundation\Blender 3.5\3.5\scripts\modules\addon_utils.py", line 369, in enable
mod.register()
File "C:\Users\MOH80574\AppData\Roaming\Blender Foundation\Blender\3.5\scripts\addons\mitsuba-blender_init_.py", line 301, in register
if try_register_mitsuba(context):
File "C:\Users\MOH80574\AppData\Roaming\Blender Foundation\Blender\3.5\scripts\addons\mitsuba-blender_init_.py", line 67, in try_register_mitsuba
could_init_mitsuba = init_mitsuba(context)
File "C:\Users\MOH80574\AppData\Roaming\Blender Foundation\Blender\3.5\scripts\addons\mitsuba-blender_init_.py", line 35, in init_mitsuba
import mitsuba
File "C:\Program Files\Blender Foundation\Blender 3.5\3.5\python\lib\site-packages\mitsuba_init_.py", line 69, in
raise exc
ImportError: The 'mitsuba' native modules could not be imported. You're likely trying to use Mitsuba within a Python binary (C:\Program Files\Blender Foundation\Blender 3.5\3.5\python\bin\python.exe) that is different from the one for which the native module was compiled (C:\Users\runneradmin\AppData\Local\Temp\cibw-run-rwptb42b\cp310-win_amd64\build\venv\Scripts\python.exe).

Hello, I also encountered this problem, is there a solution now?

Unfortunately, it hasnt been resolved till now

I am facing the same issue.....is this resolved??

Closing this issue, as it seems to be a duplicate of #61. Please see the discussion there.