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

Is there a way to isntall pyrealsense2 in anaconda2 (python 2.7) #71

Closed ljc19800331 closed 6 years ago

ljc19800331 commented 6 years ago
Required Info
Camera Model SR300
Firmware Version
Operating System & Version Windows 10
librealsense version Latest
pyrealsense version pyrealsense2

Hello,

I can successfully install pyrealsense2 in windows 10, but I can't find any information which can install with Anaconda2. Do I need to compile from scratch using conda in command line? Thanks.

I try to compile by myself but get the following error:

building 'pyrealsense.rsutilwrapper' extension C:\Users\gm143\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ipyrealsense -IC:\Anaconda2\lib\site-packages\numpy\core\include -I/usr/local/include/librealsense -IC:\Anaconda2\include -IC:\Anaconda2\PC /Tppyrealsense/rsutilwrapper.cpp /Fobuild\temp.win-amd64-2.7\Release\pyrealsense/rsutilwrapper.obj rsutilwrapper.cpp c:\anaconda2\lib\site-packages\numpy\core\include\numpy\npy_1_7_deprecated_api.h(12) : Warning Msg: Using deprecated NumPy API, disable it by #defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION pyrealsense/rsutilwrapper.cpp(563) : fatal error C1083: Cannot open include file: 'stdint.h': No such file or directory error: command 'C:\Users\gm143\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe' failed with exit status 2

toinsson commented 6 years ago

Cannot open include file: 'stdint.h'

you need to have this file in your path, (mentioned in the prerequisites : ) ). Just make sure you download it or make it available.

ljc19800331 commented 6 years ago

Thanks for the reply. @toinsson

I solved the previous problem but I still get the following error. If I have successfully installed InterSDK in windows. Do I need to recompile librealsense from scratch? The following error seems like I need to do that. "C:\Anaconda2\include\rsutil.h(7) : fatal error C1083: Cannot open include file: 'h/rs_types.h': No such file or directory"

I have successfully installed pyrealsense2 package in python 2.7.11 but not with anaconda ( I have installed both on my computer). Do I need to use the same 'stdint.h' file with the same in python 2.7.11?

I also want to try with the method: conda create -n pyrs python=2 source activate pyrs conda install numpy pip install pycparser

But I worry it will influence my original packages in anaconda2.

Thanks

ljc19800331 commented 6 years ago

I have solved the problem. Thanks for your guidance. @toinsson