toinsson / pyrealsense

Cross-platform ctypes/Cython wrapper to the librealsense library (v1.x)
http://pyrealsense.readthedocs.io
Apache License 2.0
121 stars 46 forks source link

install pyrealsense error #79

Closed chuan0000 closed 6 years ago

chuan0000 commented 6 years ago
Required Info
Camera Model R200
Firmware Version
Operating System & Version ubuntu 16.04
librealsense version
pyrealsense version

when i install pyrealsense i use sudo pip install pyrealsene and i already put the pyrealsense into the pyton2.7 the result :

/usr/local/lib/python3.5/dist-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]

warning "Using deprecated NumPy API, disable it by " \

  ^
pyrealsense/rsutilwrapper.cpp:614:16: fatal error: rs.h: No such file or directory
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

Command "/usr/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-install-t6fgyL/pyrealsense/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-record-bTg0ac/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-t6fgyL/pyrealsense/

plz help me to install pyrealsense ,thx

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

how to do that?

robinloujun commented 6 years ago

Just check if you have installed the librealsense on your computer. If so, then add the path of rs.h to the environmental variable, that is export PYRS_INCLUDES=path/to/rs, for me the path is /opt/ros/kinetic/include/librealsense/.