Giter Site home page Giter Site logo

Comments (5)

nik85 avatar nik85 commented on July 17, 2024 1

Ok seemed to be my own fault. Since it was not possible to import render_ext, somebody with more experience might have noticed that there might be an issue with the gpu libraries while compiling.

However, cmake did not abort with an error message and compiled smoothly.
It was not enough to only add cmake .. -DMTS_OPTIX_PATH="" to the cmake command, but also necessarry to set the path variable to "C:\ProgramData\NVIDIA Corporation\OptiX SDK 6.5.0\bin64".

It became obvious when running mitsuba.exe from cmd occurred with the error that optix.6.5.0.dll was not found/installed.

Since i never tried to run it, it only gave me this strange import error within python.

from mitsuba2.

Speierers avatar Speierers commented on July 17, 2024

Thanks @nik85 for your feedbacks!

We strongly recommand to use the setpath.sh script to add the compiled Mitsuba module to your Python path instead of manually copying those in your site-package folder.

# After building (on Linux)
source setpath.sh

Regarding the missing CMake error message when Optix/bin is missing from the path, I will add a line in the doc.

from mitsuba2.

atuyoti avatar atuyoti commented on July 17, 2024

Dear @Speierers
I have the same problem.
I tried to add cmake .. -DMTS_OPTIX_PATH="C:\ProgramData\NVIDIA Corporation\Optix SDK 6.5.0" to the cmake command, and to set the path variable to "C:\ProgramData\NVIDIA Corporation\OptiX SDK 6.5.0\bin64".

Error message is shown below.
cmake .. _G "Visual Studio 16 2019" -A x64 -DMTS_OPTIX_PATH="C:\ProgramData\NVIDIA Corporation\OptiX SDK 6.5.0"

after building with visual studio 2019,

(base) @C:\Users\AOTO_FAB\Desktop\Atuyoti\mitsuba2>setpath.bat (base) C:\Users\AOTO_FAB\Desktop\Atuyoti\mitsuba2>cd C:\Users\AOTO_FAB\Desktop\Atuyoti\mitsuba2\docs\examples\01_render_scene (base) C:\Users\AOTO_FAB\Desktop\Atuyoti\mitsuba2\docs\examples\01_render_scene>python render_scene.py Traceback (most recent call last): File "C:\Users\AOTO_FAB\Desktop\Atuyoti\mitsuba2\build\dist\python\mitsuba\__init__.py", line 12, in <module> _import('mitsuba.core_ext') File "C:\Users\AOTO_FAB\anaconda3\lib\importlib\__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1006, in _gcd_import File "<frozen importlib._bootstrap>", line 983, in _find_and_load File "<frozen importlib._bootstrap>", line 965, in _find_and_load_unlocked ModuleNotFoundError: No module named 'mitsuba.core_ext' The above exception was the direct cause of the following exception: Traceback (most recent call last): File "render_scene.py", line 3, in <module> import mitsuba File "C:\Users\AOTO_FAB\Desktop\Atuyoti\mitsuba2\build\dist\python\mitsuba\__init__.py", line 33, in <module> raise exc ImportError: The 'mitsuba' native modules could not be imported. You're likely trying to use Mitsuba within a Python binary (C:\Users\AOTO_FAB\anaconda3\python.exe) that is different from the one for which the native module was compiled (C:\Users\AOTO_FAB\AppData\Local\Programs\Python\Python38\python.exe).

System configuration
windows10
Optix SDK 6.5.0
cmake 3.16.8
python 3.7.6

from mitsuba2.

nik85 avatar nik85 commented on July 17, 2024

To me it seems that you have a different error. It states that you were compiling against Python3.8 in the last line.
However you mentioned python 3.7.6 in your system configuration. I had a similar error when I was using miniconda.
The problem is, that there seems to be a fallback or lookup on the "default" python version when using cmake, which seems to be the anaconda 3.8 one in your case. This is path is by default set in your path environment, thats why it was used for compilation. Just add your python3.7.6. folder to path and either remove the anaconda base directory. At least temporarily.

Or as I just saw it, it is the other way around and you are just using the wrong interpreter.

from mitsuba2.

atuyoti avatar atuyoti commented on July 17, 2024

@nik85
Thanks for your advice.
It worked!!

from mitsuba2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.