mitsuba-renderer / mitsuba3

Mitsuba 3: A Retargetable Forward and Inverse Renderer
https://www.mitsuba-renderer.org/
Other
2.1k stars 246 forks source link

Fail to pip install customized mitsuba #1293

Open denghilbert opened 2 months ago

denghilbert commented 2 months ago

Hi,

I’m trying to make several custom changes to Mitsuba, and I want to install it into my conda environment using pip so that I can directly use Mitsuba. However, I'm having trouble pip installing the customized version of Mitsuba. According to the error message, it should be resolved by simply running pip install typing-extensions, but it keeps saying ModuleNotFoundError: No module named 'typing_extensions'. I am using python=3.9.

Below is the full message I receive when trying to pip install Mitsuba. I look forward to hearing back from you soon! Thanks.

~/Desktop/mitsuba3 (master*) » pip install .                                                                                                       130 ↵ youming@youming
Processing /home/youming/Desktop/mitsuba3
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting drjit==0.4.2 (from mitsuba==3.5.0)
  Using cached drjit-0.4.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (6.5 kB)
Using cached drjit-0.4.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.5 MB)
Building wheels for collected packages: mitsuba
  Building wheel for mitsuba (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for mitsuba (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [1159 lines of output]

      --------------------------------------------------------------------------------
      -- Trying 'Ninja' generator
      --------------------------------
      ---------------------------
      ----------------------
      -----------------
      ------------
      -------
      --
      Not searching for unused variables given on the command line.
      -- The C compiler identification is GNU 11.4.0
      -- Detecting C compiler ABI info
      -- Detecting C compiler ABI info - done
      -- Check for working C compiler: /usr/bin/cc - skipped
      -- Detecting C compile features
      -- Detecting C compile features - done
      -- The CXX compiler identification is GNU 11.4.0
      -- Detecting CXX compiler ABI info
      -- Detecting CXX compiler ABI info - done
      -- Check for working CXX compiler: /usr/bin/c++ - skipped
      -- Detecting CXX compile features
      -- Detecting CXX compile features - done
      -- Configuring done (0.3s)
      -- Generating done (0.0s)
      -- Build files have been written to: /home/youming/Desktop/mitsuba3/_cmake_test_compile/build
      --
      -------
      ------------
      -----------------
      ----------------------
      ---------------------------
      --------------------------------
      -- Trying 'Ninja' generator - success
      --------------------------------------------------------------------------------

      Configuring Project
        Working directory:
          /home/youming/Desktop/mitsuba3/_skbuild/linux-x86_64-3.9/cmake-build
        Command:
          /tmp/pip-build-env-ptzsyd13/overlay/lib/python3.9/site-packages/cmake/data/bin/cmake /home/youming/Desktop/mitsuba3 -G Ninja -DCMAKE_MAKE_PROGRAM:FILEPATH=/tmp/pip-build-env-ptzsyd13/overlay/lib/python3.9/site-packages/ninja/data/bin/ninja --no-warn-unused-cli -DCMAKE_INSTALL_PREFIX:PATH=/home/youming/Desktop/mitsuba3/_skbuild/linux-x86_64-3.9/cmake-install -DPYTHON_VERSION_STRING:STRING=3.9.0 -DSKBUILD:INTERNAL=TRUE -DCMAKE_MODULE_PATH:PATH=/tmp/pip-build-env-ptzsyd13/overlay/lib/python3.9/site-packages/skbuild/resources/cmake -DPYTHON_EXECUTABLE:PATH=/home/youming/anaconda3/envs/mitsuba/bin/python -DPYTHON_INCLUDE_DIR:PATH=/home/youming/anaconda3/envs/mitsuba/include/python3.9 -DPYTHON_LIBRARY:PATH=/home/youming/anaconda3/envs/mitsuba/lib/libpython3.9.so -DPython_EXECUTABLE:PATH=/home/youming/anaconda3/envs/mitsuba/bin/python -DPython_ROOT_DIR:PATH=/home/youming/anaconda3/envs/mitsuba -DPython_FIND_REGISTRY:STRING=NEVER -DPython_INCLUDE_DIR:PATH=/home/youming/anaconda3/envs/mitsuba/include/python3.9 -DPython3_EXECUTABLE:PATH=/home/youming/anaconda3/envs/mitsuba/bin/python -DPython3_ROOT_DIR:PATH=/home/youming/anaconda3/envs/mitsuba -DPython3_FIND_REGISTRY:STRING=NEVER -DPython3_INCLUDE_DIR:PATH=/home/youming/anaconda3/envs/mitsuba/include/python3.9 -DCMAKE_MAKE_PROGRAM:FILEPATH=/tmp/pip-build-env-ptzsyd13/overlay/lib/python3.9/site-packages/ninja/data/bin/ninja -DCMAKE_INSTALL_LIBDIR=mitsuba -DCMAKE_INSTALL_BINDIR=mitsuba -DCMAKE_INSTALL_INCLUDEDIR=mitsuba/include -DCMAKE_INSTALL_DATAROOTDIR=mitsuba/data -DCMAKE_PREFIX_PATH=/home/youming/Desktop/mitsuba3/ext/drjit -DCMAKE_TOOLCHAIN_FILE= -DMI_DRJIT_CMAKE_DIR:STRING= -DMI_SRGB_COEFF_FILE:STRING= -DMI_PYTHON_STUBS_DIR:STRING= -DCMAKE_BUILD_TYPE:STRING=Release

      Not searching for unused variables given on the command line.
      -- Mitsuba v3.5.0
      -- Mitsuba: setting portable compilation defaults for scikit-build.
      '/home/youming/anaconda3/envs/mitsuba/bin/python' '-m' 'nanobind' '--cmake_dir'
      /home/youming/anaconda3/envs/mitsuba/bin/python: No module named nanobind
      '/home/youming/anaconda3/envs/mitsuba/bin/python' '-c' 'import drjit; print(drjit.get_cmake_dir())'
      -- Found Dr.Jit: /home/youming/Desktop/mitsuba3/ext/drjit/include (found version "0.4.2" )
      -- Mitsuba: building the following variants:
      --  * scalar_rgb
      --  * scalar_spectral
      --  * cuda_ad_rgb
      --  * llvm_ad_rgb
      --  * llvm_ad_spectral
      CMake Deprecation Warning at ext/embree/CMakeLists.txt:19 (CMAKE_MINIMUM_REQUIRED):
        Compatibility with CMake < 3.5 will be removed from a future version of
        CMake.

        Update the VERSION argument <min> value or use a ...<max> suffix to tell
        CMake that the project does not need compatibility with older versions.

      -- GNU detected
      -- Configure ILMBASE Version: 2.5.5 Lib API: 25.0.4
      -- Configure OpenEXR Version: 2.5.5 Lib API: 25.0.4
      -- Tests are disabled. Set FASTFLOAT_TEST to ON to run tests.
      -- Mitsuba: using OptiX for GPU ray tracing.
      -- Mitsuba: using Embree for CPU ray tracing.
      -- Mitsuba: OptiX debug and validation flags disabled.
      -- Configuring done (0.5s)
      -- Generating done (0.1s)
      -- Build files have been written to: /home/youming/Desktop/mitsuba3/_skbuild/linux-x86_64-3.9/cmake-build
      [1/897] Generating pngprefix.h
      ......
      [863/897] Building CXX object src/python/CMakeFiles/llvm_ad_spectral.dir/__/render/python/shape_v.cpp.o
      [864/897] Building CXX object src/python/CMakeFiles/llvm_ad_spectral.dir/__/core/python/transform_v.cpp.o
      [865/897] Building CXX object src/python/CMakeFiles/cuda_ad_rgb.dir/__/core/python/distr_2d_v.cpp.o
      [866/897] Linking CXX shared module python/mitsuba/cuda_ad_rgb.cpython-39-x86_64-linux-gnu.so
      [867/897] Building CXX object src/integrators/CMakeFiles/volpathmis.dir/volpathmis.cpp.o
      [868/897] Linking CXX shared library plugins/volpathmis.so
      [869/897] Building CXX object src/python/CMakeFiles/llvm_ad_rgb.dir/__/core/python/distr_2d_v.cpp.o
      [870/897] Linking CXX shared module python/mitsuba/llvm_ad_rgb.cpython-39-x86_64-linux-gnu.so
      [871/897] Building CXX object src/python/CMakeFiles/llvm_ad_spectral.dir/__/core/python/distr_2d_v.cpp.o
      [872/897] Linking CXX shared module python/mitsuba/llvm_ad_spectral.cpython-39-x86_64-linux-gnu.so
      [873/897] Generating ../../python/mitsuba/mueller_stubs.pyi
      FAILED: python/mitsuba/mueller_stubs.pyi /home/youming/Desktop/mitsuba3/_skbuild/linux-x86_64-3.9/cmake-build/python/mitsuba/mueller_stubs.pyi
      cd /home/youming/Desktop/mitsuba3/_skbuild/linux-x86_64-3.9/cmake-build/src/python && /home/youming/anaconda3/envs/mitsuba/bin/python /home/youming/Desktop/mitsuba3/ext/nanobind/src/stubgen.py -q -i /home/youming/Desktop/mitsuba3/_skbuild/linux-x86_64-3.9/cmake-build/python -p /home/youming/Desktop/mitsuba3/src/python/stubs.pat -m mitsuba.mitsuba_stubs.mueller -o /home/youming/Desktop/mitsuba3/_skbuild/linux-x86_64-3.9/cmake-build/python/mitsuba/mueller_stubs.pyi
      Traceback (most recent call last):
        File "/home/youming/Desktop/mitsuba3/ext/nanobind/src/stubgen.py", line 79, in <module>
          import typing_extensions
      ModuleNotFoundError: No module named 'typing_extensions'

      During handling of the above exception, another exception occurred:

      Traceback (most recent call last):
        File "/home/youming/Desktop/mitsuba3/ext/nanobind/src/stubgen.py", line 81, in <module>
          raise RuntimeError(
      RuntimeError: stubgen.py requires the 'typing_extensions' package on Python <3.11
      [874/897] Generating ../../python/mitsuba/python/chi2_stubs.pyi
      FAILED: python/mitsuba/python/chi2_stubs.pyi /home/youming/Desktop/mitsuba3/_skbuild/linux-x86_64-3.9/cmake-build/python/mitsuba/python/chi2_stubs.pyi
      cd /home/youming/Desktop/mitsuba3/_skbuild/linux-x86_64-3.9/cmake-build/src/python && /home/youming/anaconda3/envs/mitsuba/bin/python /home/youming/Desktop/mitsuba3/ext/nanobind/src/stubgen.py -q -i /home/youming/Desktop/mitsuba3/_skbuild/linux-x86_64-3.9/cmake-build/python -p /home/youming/Desktop/mitsuba3/src/python/stubs.pat -m mitsuba.mitsuba_stubs.python.chi2 -o /home/youming/Desktop/mitsuba3/_skbuild/linux-x86_64-3.9/cmake-build/python/mitsuba/python/chi2_stubs.pyi
      Traceback (most recent call last):
        File "/home/youming/Desktop/mitsuba3/ext/nanobind/src/stubgen.py", line 79, in <module>
          import typing_extensions
      ModuleNotFoundError: No module named 'typing_extensions'

      During handling of the above exception, another exception occurred:

      Traceback (most recent call last):
        File "/home/youming/Desktop/mitsuba3/ext/nanobind/src/stubgen.py", line 81, in <module>
          raise RuntimeError(
      RuntimeError: stubgen.py requires the 'typing_extensions' package on Python <3.11
      [875/897] Generating ../../python/mitsuba/python/util_stubs.pyi
      FAILED: python/mitsuba/python/util_stubs.pyi /home/youming/Desktop/mitsuba3/_skbuild/linux-x86_64-3.9/cmake-build/python/mitsuba/python/util_stubs.pyi
      cd /home/youming/Desktop/mitsuba3/_skbuild/linux-x86_64-3.9/cmake-build/src/python && /home/youming/anaconda3/envs/mitsuba/bin/python /home/youming/Desktop/mitsuba3/ext/nanobind/src/stubgen.py -q -i /home/youming/Desktop/mitsuba3/_skbuild/linux-x86_64-3.9/cmake-build/python -p /home/youming/Desktop/mitsuba3/src/python/stubs.pat -m mitsuba.mitsuba_stubs.python.util -o /home/youming/Desktop/mitsuba3/_skbuild/linux-x86_64-3.9/cmake-build/python/mitsuba/python/util_stubs.pyi
      Traceback (most recent call last):
        File "/home/youming/Desktop/mitsuba3/ext/nanobind/src/stubgen.py", line 79, in <module>
          import typing_extensions
      ModuleNotFoundError: No module named 'typing_extensions'

      During handling of the above exception, another exception occurred:

      Traceback (most recent call last):
        File "/home/youming/Desktop/mitsuba3/ext/nanobind/src/stubgen.py", line 81, in <module>
          raise RuntimeError(
      RuntimeError: stubgen.py requires the 'typing_extensions' package on Python <3.11
      [876/897] Generating ../../python/mitsuba/warp_stubs.pyi
      FAILED: python/mitsuba/warp_stubs.pyi /home/youming/Desktop/mitsuba3/_skbuild/linux-x86_64-3.9/cmake-build/python/mitsuba/warp_stubs.pyi
      cd /home/youming/Desktop/mitsuba3/_skbuild/linux-x86_64-3.9/cmake-build/src/python && /home/youming/anaconda3/envs/mitsuba/bin/python /home/youming/Desktop/mitsuba3/ext/nanobind/src/stubgen.py -q -i /home/youming/Desktop/mitsuba3/_skbuild/linux-x86_64-3.9/cmake-build/python -p /home/youming/Desktop/mitsuba3/src/python/stubs.pat -m mitsuba.mitsuba_stubs.warp -o /home/youming/Desktop/mitsuba3/_skbuild/linux-x86_64-3.9/cmake-build/python/mitsuba/warp_stubs.pyi
      Traceback (most recent call last):
        File "/home/youming/Desktop/mitsuba3/ext/nanobind/src/stubgen.py", line 79, in <module>
          import typing_extensions
      ModuleNotFoundError: No module named 'typing_extensions'

      During handling of the above exception, another exception occurred:

      Traceback (most recent call last):
        File "/home/youming/Desktop/mitsuba3/ext/nanobind/src/stubgen.py", line 81, in <module>
          raise RuntimeError(
      RuntimeError: stubgen.py requires the 'typing_extensions' package on Python <3.11
      [877/897] Generating ../../python/mitsuba/python/xml_stubs.pyi
      FAILED: python/mitsuba/python/xml_stubs.pyi /home/youming/Desktop/mitsuba3/_skbuild/linux-x86_64-3.9/cmake-build/python/mitsuba/python/xml_stubs.pyi
      cd /home/youming/Desktop/mitsuba3/_skbuild/linux-x86_64-3.9/cmake-build/src/python && /home/youming/anaconda3/envs/mitsuba/bin/python /home/youming/Desktop/mitsuba3/ext/nanobind/src/stubgen.py -q -i /home/youming/Desktop/mitsuba3/_skbuild/linux-x86_64-3.9/cmake-build/python -p /home/youming/Desktop/mitsuba3/src/python/stubs.pat -m mitsuba.mitsuba_stubs.python.xml -o /home/youming/Desktop/mitsuba3/_skbuild/linux-x86_64-3.9/cmake-build/python/mitsuba/python/xml_stubs.pyi
      Traceback (most recent call last):
        File "/home/youming/Desktop/mitsuba3/ext/nanobind/src/stubgen.py", line 79, in <module>
          import typing_extensions
      ModuleNotFoundError: No module named 'typing_extensions'

      During handling of the above exception, another exception occurred:

      Traceback (most recent call last):
        File "/home/youming/Desktop/mitsuba3/ext/nanobind/src/stubgen.py", line 81, in <module>
          raise RuntimeError(
      RuntimeError: stubgen.py requires the 'typing_extensions' package on Python <3.11
      [878/897] Generating ../../python/mitsuba/python/math_py_stubs.pyi
      FAILED: python/mitsuba/python/math_py_stubs.pyi /home/youming/Desktop/mitsuba3/_skbuild/linux-x86_64-3.9/cmake-build/python/mitsuba/python/math_py_stubs.pyi
      cd /home/youming/Desktop/mitsuba3/_skbuild/linux-x86_64-3.9/cmake-build/src/python && /home/youming/anaconda3/envs/mitsuba/bin/python /home/youming/Desktop/mitsuba3/ext/nanobind/src/stubgen.py -q -i /home/youming/Desktop/mitsuba3/_skbuild/linux-x86_64-3.9/cmake-build/python -p /home/youming/Desktop/mitsuba3/src/python/stubs.pat -m mitsuba.mitsuba_stubs.python.math_py -o /home/youming/Desktop/mitsuba3/_skbuild/linux-x86_64-3.9/cmake-build/python/mitsuba/python/math_py_stubs.pyi
      Traceback (most recent call last):
        File "/home/youming/Desktop/mitsuba3/ext/nanobind/src/stubgen.py", line 79, in <module>
          import typing_extensions
      ModuleNotFoundError: No module named 'typing_extensions'

      During handling of the above exception, another exception occurred:

      Traceback (most recent call last):
        File "/home/youming/Desktop/mitsuba3/ext/nanobind/src/stubgen.py", line 81, in <module>
          raise RuntimeError(
      RuntimeError: stubgen.py requires the 'typing_extensions' package on Python <3.11
      [879/897] Generating ../../python/mitsuba/misc_stubs.pyi
      FAILED: python/mitsuba/misc_stubs.pyi /home/youming/Desktop/mitsuba3/_skbuild/linux-x86_64-3.9/cmake-build/python/mitsuba/misc_stubs.pyi
      cd /home/youming/Desktop/mitsuba3/_skbuild/linux-x86_64-3.9/cmake-build/src/python && /home/youming/anaconda3/envs/mitsuba/bin/python /home/youming/Desktop/mitsuba3/ext/nanobind/src/stubgen.py -q -i /home/youming/Desktop/mitsuba3/_skbuild/linux-x86_64-3.9/cmake-build/python -p /home/youming/Desktop/mitsuba3/src/python/stubs.pat -m mitsuba.mitsuba_stubs.misc -o /home/youming/Desktop/mitsuba3/_skbuild/linux-x86_64-3.9/cmake-build/python/mitsuba/misc_stubs.pyi
      Traceback (most recent call last):
        File "/home/youming/Desktop/mitsuba3/ext/nanobind/src/stubgen.py", line 79, in <module>
          import typing_extensions
      ModuleNotFoundError: No module named 'typing_extensions'

      During handling of the above exception, another exception occurred:

      Traceback (most recent call last):
        File "/home/youming/Desktop/mitsuba3/ext/nanobind/src/stubgen.py", line 81, in <module>
          raise RuntimeError(
      RuntimeError: stubgen.py requires the 'typing_extensions' package on Python <3.11
      [880/897] Generating ../../python/mitsuba/python/ad_stubs.pyi
      FAILED: python/mitsuba/python/ad_stubs.pyi /home/youming/Desktop/mitsuba3/_skbuild/linux-x86_64-3.9/cmake-build/python/mitsuba/python/ad_stubs.pyi
      cd /home/youming/Desktop/mitsuba3/_skbuild/linux-x86_64-3.9/cmake-build/src/python && /home/youming/anaconda3/envs/mitsuba/bin/python /home/youming/Desktop/mitsuba3/ext/nanobind/src/stubgen.py -q -i /home/youming/Desktop/mitsuba3/_skbuild/linux-x86_64-3.9/cmake-build/python -p /home/youming/Desktop/mitsuba3/src/python/stubs.pat -m mitsuba.mitsuba_stubs.python.ad -o /home/youming/Desktop/mitsuba3/_skbuild/linux-x86_64-3.9/cmake-build/python/mitsuba/python/ad_stubs.pyi
      Traceback (most recent call last):
        File "/home/youming/Desktop/mitsuba3/ext/nanobind/src/stubgen.py", line 79, in <module>
          import typing_extensions
      ModuleNotFoundError: No module named 'typing_extensions'

      During handling of the above exception, another exception occurred:

      Traceback (most recent call last):
        File "/home/youming/Desktop/mitsuba3/ext/nanobind/src/stubgen.py", line 81, in <module>
          raise RuntimeError(
      RuntimeError: stubgen.py requires the 'typing_extensions' package on Python <3.11
      [881/897] Generating ../../python/mitsuba/spline_stubs.pyi
      FAILED: python/mitsuba/spline_stubs.pyi /home/youming/Desktop/mitsuba3/_skbuild/linux-x86_64-3.9/cmake-build/python/mitsuba/spline_stubs.pyi
      cd /home/youming/Desktop/mitsuba3/_skbuild/linux-x86_64-3.9/cmake-build/src/python && /home/youming/anaconda3/envs/mitsuba/bin/python /home/youming/Desktop/mitsuba3/ext/nanobind/src/stubgen.py -q -i /home/youming/Desktop/mitsuba3/_skbuild/linux-x86_64-3.9/cmake-build/python -p /home/youming/Desktop/mitsuba3/src/python/stubs.pat -m mitsuba.mitsuba_stubs.spline -o /home/youming/Desktop/mitsuba3/_skbuild/linux-x86_64-3.9/cmake-build/python/mitsuba/spline_stubs.pyi
      Traceback (most recent call last):
        File "/home/youming/Desktop/mitsuba3/ext/nanobind/src/stubgen.py", line 79, in <module>
          import typing_extensions
      ModuleNotFoundError: No module named 'typing_extensions'

      During handling of the above exception, another exception occurred:

      Traceback (most recent call last):
        File "/home/youming/Desktop/mitsuba3/ext/nanobind/src/stubgen.py", line 81, in <module>
          raise RuntimeError(
      RuntimeError: stubgen.py requires the 'typing_extensions' package on Python <3.11
      [882/897] Generating ../../python/mitsuba/quad_stubs.pyi
      FAILED: python/mitsuba/quad_stubs.pyi /home/youming/Desktop/mitsuba3/_skbuild/linux-x86_64-3.9/cmake-build/python/mitsuba/quad_stubs.pyi
      cd /home/youming/Desktop/mitsuba3/_skbuild/linux-x86_64-3.9/cmake-build/src/python && /home/youming/anaconda3/envs/mitsuba/bin/python /home/youming/Desktop/mitsuba3/ext/nanobind/src/stubgen.py -q -i /home/youming/Desktop/mitsuba3/_skbuild/linux-x86_64-3.9/cmake-build/python -p /home/youming/Desktop/mitsuba3/src/python/stubs.pat -m mitsuba.mitsuba_stubs.quad -o /home/youming/Desktop/mitsuba3/_skbuild/linux-x86_64-3.9/cmake-build/python/mitsuba/quad_stubs.pyi
      Traceback (most recent call last):
        File "/home/youming/Desktop/mitsuba3/ext/nanobind/src/stubgen.py", line 79, in <module>
          import typing_extensions
      ModuleNotFoundError: No module named 'typing_extensions'

      During handling of the above exception, another exception occurred:

      Traceback (most recent call last):
        File "/home/youming/Desktop/mitsuba3/ext/nanobind/src/stubgen.py", line 81, in <module>
          raise RuntimeError(
      RuntimeError: stubgen.py requires the 'typing_extensions' package on Python <3.11
      [883/897] Generating ../../python/mitsuba/py.typed, ../../python/mitsuba/stubs.pyi
      FAILED: python/mitsuba/py.typed python/mitsuba/stubs.pyi /home/youming/Desktop/mitsuba3/_skbuild/linux-x86_64-3.9/cmake-build/python/mitsuba/py.typed /home/youming/Desktop/mitsuba3/_skbuild/linux-x86_64-3.9/cmake-build/python/mitsuba/stubs.pyi
      cd /home/youming/Desktop/mitsuba3/_skbuild/linux-x86_64-3.9/cmake-build/src/python && /home/youming/anaconda3/envs/mitsuba/bin/python /home/youming/Desktop/mitsuba3/ext/nanobind/src/stubgen.py -q -i /home/youming/Desktop/mitsuba3/_skbuild/linux-x86_64-3.9/cmake-build/python -p /home/youming/Desktop/mitsuba3/src/python/stubs.pat -M /home/youming/Desktop/mitsuba3/_skbuild/linux-x86_64-3.9/cmake-build/python/mitsuba/py.typed -m mitsuba.mitsuba_stubs -o /home/youming/Desktop/mitsuba3/_skbuild/linux-x86_64-3.9/cmake-build/python/mitsuba/stubs.pyi
      Traceback (most recent call last):
        File "/home/youming/Desktop/mitsuba3/ext/nanobind/src/stubgen.py", line 79, in <module>
          import typing_extensions
      ModuleNotFoundError: No module named 'typing_extensions'

      During handling of the above exception, another exception occurred:

      Traceback (most recent call last):
        File "/home/youming/Desktop/mitsuba3/ext/nanobind/src/stubgen.py", line 81, in <module>
          raise RuntimeError(
      RuntimeError: stubgen.py requires the 'typing_extensions' package on Python <3.11
      [884/897] Generating ../../python/mitsuba/math_stubs.pyi
      FAILED: python/mitsuba/math_stubs.pyi /home/youming/Desktop/mitsuba3/_skbuild/linux-x86_64-3.9/cmake-build/python/mitsuba/math_stubs.pyi
      cd /home/youming/Desktop/mitsuba3/_skbuild/linux-x86_64-3.9/cmake-build/src/python && /home/youming/anaconda3/envs/mitsuba/bin/python /home/youming/Desktop/mitsuba3/ext/nanobind/src/stubgen.py -q -i /home/youming/Desktop/mitsuba3/_skbuild/linux-x86_64-3.9/cmake-build/python -p /home/youming/Desktop/mitsuba3/src/python/stubs.pat -m mitsuba.mitsuba_stubs.math -o /home/youming/Desktop/mitsuba3/_skbuild/linux-x86_64-3.9/cmake-build/python/mitsuba/math_stubs.pyi
      Traceback (most recent call last):
        File "/home/youming/Desktop/mitsuba3/ext/nanobind/src/stubgen.py", line 79, in <module>
          import typing_extensions
      ModuleNotFoundError: No module named 'typing_extensions'

      During handling of the above exception, another exception occurred:

      Traceback (most recent call last):
        File "/home/youming/Desktop/mitsuba3/ext/nanobind/src/stubgen.py", line 81, in <module>
          raise RuntimeError(
      RuntimeError: stubgen.py requires the 'typing_extensions' package on Python <3.11
      ninja: build stopped: subcommand failed.
      Traceback (most recent call last):
        File "/tmp/pip-build-env-ptzsyd13/overlay/lib/python3.9/site-packages/skbuild/setuptools_wrap.py", line 668, in setup
          cmkr.make(make_args, install_target=cmake_install_target, env=env)
        File "/tmp/pip-build-env-ptzsyd13/overlay/lib/python3.9/site-packages/skbuild/cmaker.py", line 696, in make
          self.make_impl(clargs=clargs, config=config, source_dir=source_dir, install_target=install_target, env=env)
        File "/tmp/pip-build-env-ptzsyd13/overlay/lib/python3.9/site-packages/skbuild/cmaker.py", line 741, in make_impl
          raise SKBuildError(msg)

      An error occurred while building with CMake.
        Command:
          /tmp/pip-build-env-ptzsyd13/overlay/lib/python3.9/site-packages/cmake/data/bin/cmake --build . --target install --config Release --
        Install target:
          install
        Source directory:
          /home/youming/Desktop/mitsuba3
        Working directory:
          /home/youming/Desktop/mitsuba3/_skbuild/linux-x86_64-3.9/cmake-build
      Please check the install target is valid and see CMake's output for more information.

      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for mitsuba
Failed to build mitsuba
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (mitsuba)
njroussel commented 2 months ago

Hi @denghilbert

When running pip install . it runs an isolated build and it will therefore ignore any packages you have installed yourself.

I'll push a commit to master in a bit, but basically we need to add typing-extensions to the requires list in pyproject.toml. You can do that on your own fork for now.