Installation: manual setting of mitsuba path is required

See original GitHub issue
  1. I need to manually specify the path of the mitsuba package in ~/.config/blender/3.3/scripts/addons/mitsuba-blender/__init__.py so that the addon can work. Here is the code I add in function init_mitsuba:
    import sys
    sys.path.append("/home/<someone>/.local/lib/python3.10/site-packages")
  1. Although the mitsuba package is installed in the blender python env., it can not be imported in the console in blender but can be imported in a new terminate.

Steps to reproduce the behavior:

  1. Install the addon according to the instructions.
  2. “could not load mitsuba package” will show in the blender dialog.
  3. ctrl+alt+T, type cd blender/3.3/python/bin and python3.10
  4. Type import mitsuba, this works.
  5. Open blender, click scripts layout
  6. Type import mitsuba, this doesn’t work and raises import error (could not find module mitsuba)
  • OS: ubuntu20.04
  • Blender Version: 3.3
  • Add-on Version: latest

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
cdsousacommented, Dec 1, 2022
0reactions
GCChen97commented, Oct 15, 2022

Hi,

No, I didn’t compile blender from source. In fact, I’ve tried either installing blender by snap or .deb. Both ways required manually setting of mitsuba-blender path.

Besides, I also need to set env. variable PYTHONPATH=/<path to>/mitsuba3/build/python for python of anaconda to correctly find the mitsuba compiled from source. And because of the env. variable, I also need to set "PYTHONPATH=‘’ " before launching blender so that the addon will not wrongly import this compiled-from-source mitsuba.

Note that the mitsuba compiled from source is used for rendering and the one used by the addon was installed when installing the addon and was used only for viewing xml scene file.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Compiling the system — mitsuba2 0.1.dev0 documentation
Once Mitsuba is compiled, run the setpath.sh/bat script to configure environment variables ( PATH/LD_LIBRARY_PATH/PYTHONPATH ) that are required to run Mitsuba.
Read more >
documentation.pdf - Mitsuba renderer
You'll first need to install a number of dependencies. It is assumed here that you are using a recent version of Ubuntu Linux...
Read more >
Mitsuba integration add-on for Blender - GitHub
Installation · Download the latest release from the release section. · In Blender, go to Edit -> Preferences -> Add-ons -> Install. ·...
Read more >
Mitsuba 3: Rendering (Tutorial #2) - YouTube
This tutorial (part #2 of an ongoing series) by Sébastien Speierer explains how to use Mitsuba 3 to render images from an interactive...
Read more >
Dr.Jit: A Just-In-Time Compiler for Differentiable Rendering
large kernel containing all program instructions needed to evaluate the integrand. ... array programming setting, causing them to fall off the fast path....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found