mitsuba-renderer / mitsuba-blender

Mitsuba integration add-on for Blender
BSD 3-Clause "New" or "Revised" License
267 stars 35 forks source link

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

Closed Pooja-M9 closed 1 year ago

Pooja-M9 commented 1 year ago

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):

bathal1 commented 1 year ago

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

Pooja-M9 commented 1 year ago

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.

bathal1 commented 1 year ago

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

bathal1 commented 1 year ago

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

Pooja-M9 commented 1 year ago

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?

bathal1 commented 1 year ago

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.

Pooja-M9 commented 1 year ago

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

bathal1 commented 1 year ago

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

Pooja-M9 commented 1 year ago

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

bathal1 commented 1 year ago

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.

Pooja-M9 commented 1 year ago

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).

Lumi0706 commented 1 year ago

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

Pooja-M9 commented 1 year ago

Unfortunately, it hasnt been resolved till now

Mysakshi2104 commented 1 year ago

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

bathal1 commented 1 year ago

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