Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error Installing pyrealsense for RealSense R200 #95

Open
tangyipeng100 opened this issue Aug 13, 2024 · 1 comment
Open

Error Installing pyrealsense for RealSense R200 #95

tangyipeng100 opened this issue Aug 13, 2024 · 1 comment

Comments

@tangyipeng100
Copy link

I need to use the RealSense R200, which requires the pyrealsense library. However, when I try to install pyrealsense, I encounter the following error:

(test) C:\Users\51745>pip install pyrealsense
Collecting pyrealsense
  Using cached pyrealsense-2.2.tar.gz (60 kB)
  Preparing metadata (setup.py) ... done
Requirement already satisfied: numpy in c:\users\51745\.conda\envs\test\lib\site-packages (from pyrealsense) (1.24.4)
Requirement already satisfied: cython in c:\users\51745\.conda\envs\test\lib\site-packages (from pyrealsense) (3.0.11)
Collecting pycparser
  Downloading pycparser-2.22-py3-none-any.whl (117 kB)
     ---------------------------------------- 117.6/117.6 kB 1.1 MB/s eta 0:00:00
Collecting six
  Downloading six-1.16.0-py2.py3-none-any.whl (11 kB)
Building wheels for collected packages: pyrealsense
  Building wheel for pyrealsense (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [4 lines of output]
      rsutilwrapper.cpp
      C:\Users\51745\.conda\envs\test\lib\site-packages\numpy\core\include\numpy\npy_1_7_deprecated_api.h(14) : Warning Msg: Using deprecated NumPy API, disable it with #define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
      pyrealsense/rsutilwrapper.cpp(1278): fatal error C1083: Cannot open include file: 'rs.h': No such file or directory
      error: command 'D:\\install software\\vs2022\\VC\\Tools\\MSVC\\14.30.30705\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pyrealsense
  Running setup.py clean for pyrealsense
Failed to build pyrealsense
Installing collected packages: six, pycparser, pyrealsense
  Running setup.py install for pyrealsense ... error
  error: subprocess-exited-with-error

  × Running setup.py install for pyrealsense did not run successfully.
  │ exit code: 1
  ╰─> [6 lines of output]
      C:\Users\51745\.conda\envs\test\lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        warnings.warn(
      rsutilwrapper.cpp
      C:\Users\51745\.conda\envs\test\lib\site-packages\numpy\core\include\numpy\npy_1_7_deprecated_api.h(14) : Warning Msg: Using deprecated NumPy API, disable it with #define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
      pyrealsense/rsutilwrapper.cpp(1278): fatal error C1083: Cannot open include file: 'rs.h': No such file or directory
      error: command 'D:\\install software\\vs2022\\VC\\Tools\\MSVC\\14.30.30705\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> pyrealsense

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

What could be the cause of this error, and how can I resolve it?

@toinsson
Copy link
Owner

Hello,

the line:

pyrealsense/rsutilwrapper.cpp(1278): fatal error C1083: Cannot open include file: 'rs.h': No such file or directory

is where I'd start.

and using the prerequisites in the readme:

Windows specifics: set the environment variable PYRS_INCLUDES to the rs.h directory location and the environment variable PYRS_LIBS to the librealsense binary location. You might also need to have stdint.h available in your path.

Hope that helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants