KavrakiLab / vamp

SIMD-Accelerated Sampling-based Motion Planning
Other
144 stars 18 forks source link

Runtime error in stubgen.py #3

Closed a-nooj closed 5 months ago

a-nooj commented 5 months ago

Running pip install .[examples,heightmaps] in a newly created virtual environment and getting a runtime error RuntimeError: stubgen.py requires the 'typing_extensions' package on Python <3.11

But I have typing_extensions installed.

(vamp_env) anuj:~/vamp (main)$ python
Python 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import typing_extensions
>>> 

Terminal output for pip install:

Processing /home/anuj/vamp
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting numpy
  Using cached numpy-1.26.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (18.2 MB)
Collecting pyyaml
  Using cached PyYAML-6.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (705 kB)
Collecting tqdm
  Using cached tqdm-4.66.2-py3-none-any.whl (78 kB)
Collecting tabulate
  Using cached tabulate-0.9.0-py3-none-any.whl (35 kB)
Collecting pybullet
  Using cached pybullet-3.2.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (103.2 MB)
Collecting fire
  Using cached fire-0.6.0-py2.py3-none-any.whl
Collecting pandas
  Using cached pandas-2.2.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (13.0 MB)
Collecting xmltodict
  Using cached xmltodict-0.13.0-py2.py3-none-any.whl (10.0 kB)
Collecting pillow
  Using cached pillow-10.3.0-cp310-cp310-manylinux_2_28_x86_64.whl (4.5 MB)
Collecting termcolor
  Using cached termcolor-2.4.0-py3-none-any.whl (7.7 kB)
Collecting six
  Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting python-dateutil>=2.8.2
  Using cached python_dateutil-2.9.0.post0-py2.py3-none-any.whl (229 kB)
Collecting tzdata>=2022.7
  Using cached tzdata-2024.1-py2.py3-none-any.whl (345 kB)
Collecting pytz>=2020.1
  Using cached pytz-2024.1-py2.py3-none-any.whl (505 kB)
Building wheels for collected packages: vamp
  Building wheel for vamp (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for vamp (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [143 lines of output]
      *** scikit-build-core 0.9.2 using CMake 3.29.2 (wheel)
      *** Configuring CMake...
      loading initial cache file build/cp310-cp310-linux_x86_64/CMakeInit.txt
      -- The C compiler identification is GNU 9.5.0
      -- The CXX compiler identification is GNU 9.5.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
      -- 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
      -- Found Python: /home/anuj/vamp_env/bin/python (found suitable version "3.10.12", minimum required is "3.8") found components: Interpreter Development.Module Development.SABIModule
      -- CPM: Adding package nanobind@0 (03ebcb883a8658706bada56e7bc11faf2e2b3f67)
      -- CPM: Adding package nigh@0 (97130999440647c204e0265d05a997dbd8da4e70)
      -- CPM: Adding package pdqsort@0 (b1ef26a55cdb60d236a5cb199c4234c704f46726)
      -- CPM: Adding package SIMDxorshift@0 (857c1a01df53cf1ee1ae8db3238f0ef42ef8e490)
      -- Configuring done (4.3s)
      -- Generating done (0.0s)
      -- Build files have been written to: /home/anuj/vamp/build/cp310-cp310-linux_x86_64
      *** Building project with Ninja...
      [1/28] Building C object CMakeFiles/_core_ext.dir/_deps/simdxorshift-src/src/xorshift128plus.c.o
      [2/28] Building C object CMakeFiles/_core_ext.dir/_deps/simdxorshift-src/src/simdxorshift128plus.c.o
      [3/28] Building CXX object CMakeFiles/_core_ext.dir/src/impl/vamp/bindings/python.cc.o
      [4/28] Building CXX object CMakeFiles/nanobind-static.dir/_deps/nanobind-src/src/nb_static_property.cpp.o
      [5/28] Building CXX object CMakeFiles/nanobind-static.dir/_deps/nanobind-src/src/nb_enum.cpp.o
      [6/28] Building CXX object CMakeFiles/nanobind-static.dir/_deps/nanobind-src/src/trampoline.cpp.o
      [7/28] Building CXX object CMakeFiles/nanobind-static.dir/_deps/nanobind-src/src/error.cpp.o
      [8/28] Building CXX object CMakeFiles/nanobind-static.dir/_deps/nanobind-src/src/implicit.cpp.o
      [9/28] Building CXX object CMakeFiles/nanobind-static.dir/_deps/nanobind-src/src/nb_ndarray.cpp.o
      [10/28] Building CXX object CMakeFiles/nanobind-static.dir/_deps/nanobind-src/src/nb_internals.cpp.o
      [11/28] Building CXX object CMakeFiles/nanobind-static.dir/_deps/nanobind-src/src/nb_type.cpp.o
      [12/28] Building CXX object CMakeFiles/nanobind-static.dir/_deps/nanobind-src/src/common.cpp.o
      [13/28] Building CXX object CMakeFiles/nanobind-static.dir/_deps/nanobind-src/src/nb_func.cpp.o
      [14/28] Linking CXX static library libnanobind-static.a
      [15/28] Building CXX object CMakeFiles/_core_ext.dir/src/impl/vamp/bindings/settings.cc.o
      [16/28] Building CXX object CMakeFiles/_core_ext.dir/src/impl/vamp/bindings/environment.cc.o
      [17/28] Building CXX object CMakeFiles/_core_ext.dir/src/impl/vamp/bindings/sphere.cc.o
      In file included from /usr/include/c++/9/tuple:39,
                       from /usr/include/c++/9/bits/unique_ptr.h:37,
                       from /usr/include/c++/9/memory:80,
                       from /home/anuj/vamp/src/impl/vamp/collision/shapes.hh:4,
                       from /home/anuj/vamp/src/impl/vamp/collision/sphere_sphere.hh:3,
                       from /home/anuj/vamp/src/impl/vamp/bindings/common.hh:4,
                       from /home/anuj/vamp/src/impl/vamp/bindings/sphere.cc:1:
      /home/anuj/vamp/src/impl/vamp/vector/interface.hh: In instantiation of ‘constexpr std::array<typename Sig::S::ScalarT, vamp::VectorInterface<DerivedT, Sig>::num_scalars_rounded> vamp::VectorInterface<DerivedT, Sig>::to_array() const [with DerivedT = vamp::Vector<vamp::SIMDVector<__vector(8) float>, 1, 3>; Sig = vamp::VectorSignature<vamp::SIMDVector<__vector(8) float>, 1, 3>; typename Sig::S::ScalarT = float]’:
      /home/anuj/vamp/src/impl/vamp/bindings/common.hh:231:32:   required from ‘nanobind::module_ vamp::binding::init_robot(nanobind::module_&) [with Robot = vamp::robots::Sphere]’
      /home/anuj/vamp/src/impl/vamp/bindings/sphere.cc:7:78:   required from here
      /usr/include/c++/9/array:94:12: note: ‘struct std::array<float, 8>’ has no user-provided default constructor
         94 |     struct array
            |            ^~~~~
      /usr/include/c++/9/array:110:56: note: and the implicitly-defined constructor does not initialize ‘float std::array<float, 8>::_M_elems [8]’
        110 |       typename _AT_Type::_Type                         _M_elems;
            |                                                        ^~~~~~~~
      [18/28] Building CXX object CMakeFiles/_core_ext.dir/src/impl/vamp/bindings/ur5.cc.o
      In file included from /usr/include/c++/9/tuple:39,
                       from /usr/include/c++/9/bits/unique_ptr.h:37,
                       from /usr/include/c++/9/memory:80,
                       from /home/anuj/vamp/src/impl/vamp/collision/shapes.hh:4,
                       from /home/anuj/vamp/src/impl/vamp/collision/sphere_sphere.hh:3,
                       from /home/anuj/vamp/src/impl/vamp/bindings/common.hh:4,
                       from /home/anuj/vamp/src/impl/vamp/bindings/ur5.cc:1:
      /home/anuj/vamp/src/impl/vamp/vector/interface.hh: In instantiation of ‘constexpr std::array<typename Sig::S::ScalarT, vamp::VectorInterface<DerivedT, Sig>::num_scalars_rounded> vamp::VectorInterface<DerivedT, Sig>::to_array() const [with DerivedT = vamp::Vector<vamp::SIMDVector<__vector(8) float>, 1, 6>; Sig = vamp::VectorSignature<vamp::SIMDVector<__vector(8) float>, 1, 6>; typename Sig::S::ScalarT = float]’:
      /home/anuj/vamp/src/impl/vamp/bindings/common.hh:231:32:   required from ‘nanobind::module_ vamp::binding::init_robot(nanobind::module_&) [with Robot = vamp::robots::UR5]’
      /home/anuj/vamp/src/impl/vamp/bindings/ur5.cc:7:58:   required from here
      /usr/include/c++/9/array:94:12: note: ‘struct std::array<float, 8>’ has no user-provided default constructor
         94 |     struct array
            |            ^~~~~
      /usr/include/c++/9/array:110:56: note: and the implicitly-defined constructor does not initialize ‘float std::array<float, 8>::_M_elems [8]’
        110 |       typename _AT_Type::_Type                         _M_elems;
            |                                                        ^~~~~~~~
      [19/28] Building CXX object CMakeFiles/_core_ext.dir/src/impl/vamp/bindings/panda.cc.o
      In file included from /usr/include/c++/9/tuple:39,
                       from /usr/include/c++/9/bits/unique_ptr.h:37,
                       from /usr/include/c++/9/memory:80,
                       from /home/anuj/vamp/src/impl/vamp/collision/shapes.hh:4,
                       from /home/anuj/vamp/src/impl/vamp/collision/sphere_sphere.hh:3,
                       from /home/anuj/vamp/src/impl/vamp/bindings/common.hh:4,
                       from /home/anuj/vamp/src/impl/vamp/bindings/panda.cc:1:
      /home/anuj/vamp/src/impl/vamp/vector/interface.hh: In instantiation of ‘constexpr std::array<typename Sig::S::ScalarT, vamp::VectorInterface<DerivedT, Sig>::num_scalars_rounded> vamp::VectorInterface<DerivedT, Sig>::to_array() const [with DerivedT = vamp::Vector<vamp::SIMDVector<__vector(8) float>, 1, 7>; Sig = vamp::VectorSignature<vamp::SIMDVector<__vector(8) float>, 1, 7>; typename Sig::S::ScalarT = float]’:
      /home/anuj/vamp/src/impl/vamp/bindings/common.hh:231:32:   required from ‘nanobind::module_ vamp::binding::init_robot(nanobind::module_&) [with Robot = vamp::robots::Panda]’
      /home/anuj/vamp/src/impl/vamp/bindings/panda.cc:7:60:   required from here
      /usr/include/c++/9/array:94:12: note: ‘struct std::array<float, 8>’ has no user-provided default constructor
         94 |     struct array
            |            ^~~~~
      /usr/include/c++/9/array:110:56: note: and the implicitly-defined constructor does not initialize ‘float std::array<float, 8>::_M_elems [8]’
        110 |       typename _AT_Type::_Type                         _M_elems;
            |                                                        ^~~~~~~~
      [20/28] Building CXX object CMakeFiles/_core_ext.dir/src/impl/vamp/bindings/fetch.cc.o
      In file included from /usr/include/c++/9/tuple:39,
                       from /usr/include/c++/9/bits/unique_ptr.h:37,
                       from /usr/include/c++/9/memory:80,
                       from /home/anuj/vamp/src/impl/vamp/collision/shapes.hh:4,
                       from /home/anuj/vamp/src/impl/vamp/collision/sphere_sphere.hh:3,
                       from /home/anuj/vamp/src/impl/vamp/bindings/common.hh:4,
                       from /home/anuj/vamp/src/impl/vamp/bindings/fetch.cc:1:
      /home/anuj/vamp/src/impl/vamp/vector/interface.hh: In instantiation of ‘constexpr std::array<typename Sig::S::ScalarT, vamp::VectorInterface<DerivedT, Sig>::num_scalars_rounded> vamp::VectorInterface<DerivedT, Sig>::to_array() const [with DerivedT = vamp::Vector<vamp::SIMDVector<__vector(8) float>, 1, 8>; Sig = vamp::VectorSignature<vamp::SIMDVector<__vector(8) float>, 1, 8>; typename Sig::S::ScalarT = float]’:
      /home/anuj/vamp/src/impl/vamp/bindings/common.hh:231:32:   required from ‘nanobind::module_ vamp::binding::init_robot(nanobind::module_&) [with Robot = vamp::robots::Fetch]’
      /home/anuj/vamp/src/impl/vamp/bindings/fetch.cc:7:60:   required from here
      /usr/include/c++/9/array:94:12: note: ‘struct std::array<float, 8>’ has no user-provided default constructor
         94 |     struct array
            |            ^~~~~
      /usr/include/c++/9/array:110:56: note: and the implicitly-defined constructor does not initialize ‘float std::array<float, 8>::_M_elems [8]’
        110 |       typename _AT_Type::_Type                         _M_elems;
            |                                                        ^~~~~~~~
      [21/28] Building CXX object CMakeFiles/_core_ext.dir/src/impl/vamp/bindings/baxter.cc.o
      In file included from /usr/include/c++/9/tuple:39,
                       from /usr/include/c++/9/bits/unique_ptr.h:37,
                       from /usr/include/c++/9/memory:80,
                       from /home/anuj/vamp/src/impl/vamp/collision/shapes.hh:4,
                       from /home/anuj/vamp/src/impl/vamp/collision/sphere_sphere.hh:3,
                       from /home/anuj/vamp/src/impl/vamp/bindings/common.hh:4,
                       from /home/anuj/vamp/src/impl/vamp/bindings/baxter.cc:1:
      /home/anuj/vamp/src/impl/vamp/vector/interface.hh: In instantiation of ‘constexpr std::array<typename Sig::S::ScalarT, vamp::VectorInterface<DerivedT, Sig>::num_scalars_rounded> vamp::VectorInterface<DerivedT, Sig>::to_array() const [with DerivedT = vamp::Vector<vamp::SIMDVector<__vector(8) float>, 1, 14>; Sig = vamp::VectorSignature<vamp::SIMDVector<__vector(8) float>, 1, 14>; typename Sig::S::ScalarT = float]’:
      /home/anuj/vamp/src/impl/vamp/bindings/common.hh:231:32:   required from ‘nanobind::module_ vamp::binding::init_robot(nanobind::module_&) [with Robot = vamp::robots::Baxter]’
      /home/anuj/vamp/src/impl/vamp/bindings/baxter.cc:7:61:   required from here
      /usr/include/c++/9/array:94:12: note: ‘struct std::array<float, 16>’ has no user-provided default constructor
         94 |     struct array
            |            ^~~~~
      /usr/include/c++/9/array:110:56: note: and the implicitly-defined constructor does not initialize ‘float std::array<float, 16>::_M_elems [16]’
        110 |       typename _AT_Type::_Type                         _M_elems;
            |                                                        ^~~~~~~~
      [22/28] Linking CXX shared module _core_ext.cpython-310-x86_64-linux-gnu.so
      [22/28] Generating stubs/__init__.pyi
      Traceback (most recent call last):
        File "/home/anuj/vamp/build/cp310-cp310-linux_x86_64/_deps/nanobind-src/src/stubgen.py", line 78, 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/anuj/vamp/build/cp310-cp310-linux_x86_64/_deps/nanobind-src/src/stubgen.py", line 80, in <module>
          raise RuntimeError(
      RuntimeError: stubgen.py requires the 'typing_extensions' package on Python <3.11
      FAILED: stubs/__init__.pyi /home/anuj/vamp/build/cp310-cp310-linux_x86_64/stubs/__init__.pyi
      cd /home/anuj/vamp/build/cp310-cp310-linux_x86_64 && /home/anuj/vamp_env/bin/python /home/anuj/vamp/build/cp310-cp310-linux_x86_64/_deps/nanobind-src/src/stubgen.py -i /home/anuj/vamp/build/cp310-cp310-linux_x86_64 -m _core_ext -o /home/anuj/vamp/build/cp310-cp310-linux_x86_64/stubs/__init__.pyi
      ninja: build stopped: subcommand failed.

      *** CMake build failed
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for vamp
Failed to build vamp
ERROR: Could not build wheels for vamp, which is required to install pyproject.toml-based projects
wbthomason commented 5 months ago

Thanks for your report! We were missing a build dependency on typing_extensions, which didn't show up in our testing because of the Python environment we were using. This should be fixed in 61a0944 - please re-open if you're still encountering the issue (though, on my system, matching your Python version, the installation now succeeds).