librealsense icon indicating copy to clipboard operation
librealsense copied to clipboard

issue on pyrealsense installation

Open spiritas1004 opened this issue 8 years ago • 1 comments

  • Before opening a new issue, we wanted to provide you with some useful suggestions (Click "Preview" above for a better view):

  • All users are welcomed to report bugs, ask questions, suggest or request enhancements and generally feel free to open new issue, even if they haven't followed any of the suggestions above :)


Required Info
Camera Model { SR300}
Firmware Version
Operating System & Version Windows 10
Kernel Version (Linux Only) (e.g. 4.14.13)
Platform PC
SDK Version 2.0

Issue Description

I want to use PyPI to install pyrealsense library. But I have got errors following: {Running setup.py clean for pyrealsense Failed to build pyrealsense Installing collected packages: pyrealsense Running setup.py install for pyrealsense ... error Complete output from command c:\users\super\anaconda3\python.exe -u -c "import setuptools, tokenize;file='C:\Users\super\AppData\Local\Temp\pip-build-wf0d42mq\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 C:\Users\super\AppData\Local\Temp\pip-y8kl5ln0-record\install-record.txt --single-version-externally-managed --compile: running install running build running build_py creating build creating build\lib.win-amd64-3.6 creating build\lib.win-amd64-3.6\pyrealsense copying pyrealsense\constants.py -> build\lib.win-amd64-3.6\pyrealsense copying pyrealsense\core.py -> build\lib.win-amd64-3.6\pyrealsense copying pyrealsense\extlib.py -> build\lib.win-amd64-3.6\pyrealsense copying pyrealsense\extstruct.py -> build\lib.win-amd64-3.6\pyrealsense copying pyrealsense\offline.py -> build\lib.win-amd64-3.6\pyrealsense copying pyrealsense\stream.py -> build\lib.win-amd64-3.6\pyrealsense copying pyrealsense\utils.py -> build\lib.win-amd64-3.6\pyrealsense copying pyrealsense__init__.py -> build\lib.win-amd64-3.6\pyrealsense running build_ext building 'pyrealsense.rsutilwrapper' extension creating build\temp.win-amd64-3.6 creating build\temp.win-amd64-3.6\Release creating build\temp.win-amd64-3.6\Release\pyrealsense C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ipyrealsense -Ic:\users\super\anaconda3\lib\site-packages\numpy\core\include -I/usr/local/include/librealsense -IC:\Users\super\librealsense-1.12.1\include\librealsense -Ic:\users\super\anaconda3\include -Ic:\users\super\anaconda3\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\winrt" /EHsc /Tppyrealsense/rsutilwrapper.cpp /Fobuild\temp.win-amd64-3.6\Release\pyrealsense/rsutilwrapper.obj rsutilwrapper.cpp c:\users\super\anaconda3\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 C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ipyrealsense -Ic:\users\super\anaconda3\lib\site-packages\numpy\core\include -I/usr/local/include/librealsense -IC:\Users\super\librealsense-1.12.1\include\librealsense -Ic:\users\super\anaconda3\include -Ic:\users\super\anaconda3\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\winrt" /EHsc /Tppyrealsense/rsutilwrapperc.cpp /Fobuild\temp.win-amd64-3.6\Release\pyrealsense/rsutilwrapperc.obj rsutilwrapperc.cpp C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:/usr/local/lib /LIBPATH:C:\Users\super\librealsense-1.12.1\bin\Win32 /LIBPATH:c:\users\super\anaconda3\libs /LIBPATH:c:\users\super\anaconda3\PCbuild\amd64 "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\LIB\amd64" "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\LIB\amd64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.16299.0\ucrt\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\lib\um\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.16299.0\um\x64" realsense.lib /EXPORT:PyInit_rsutilwrapper build\temp.win-amd64-3.6\Release\pyrealsense/rsutilwrapper.obj build\temp.win-amd64-3.6\Release\pyrealsense/rsutilwrapperc.obj /OUT:build\lib.win-amd64-3.6\pyrealsense\rsutilwrapper.cp36-win_amd64.pyd /IMPLIB:build\temp.win-amd64-3.6\Release\pyrealsense\rsutilwrapper.cp36-win_amd64.lib rsutilwrapper.obj : warning LNK4197: export 'PyInit_rsutilwrapper' specified multiple times; using first specification Creating library build\temp.win-amd64-3.6\Release\pyrealsense\rsutilwrapper.cp36-win_amd64.lib and object build\temp.win-amd64-3.6\Release\pyrealsense\rsutilwrapper.cp36-win_amd64.exp rsutilwrapperc.obj : error LNK2001: unresolved external symbol rs_reset_device_options_to_default rsutilwrapperc.obj : error LNK2001: unresolved external symbol rs_set_device_options build\lib.win-amd64-3.6\pyrealsense\rsutilwrapper.cp36-win_amd64.pyd : fatal error LNK1120: 2 unresolved externals error: command 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\link.exe' failed with exit status 1120


Command "c:\users\super\anaconda3\python.exe -u -c "import setuptools, tokenize;file='C:\Users\super\AppData\Local\Temp\pip-build-wf0d42mq\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 C:\Users\super\AppData\Local\Temp\pip-y8kl5ln0-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\super\AppData\Local\Temp\pip-build-wf0d42mq\pyrealsense}

Using Anaconda 3 with python 3.6 (64 bit), VS 2017 (tried with VS 2015 as well) Please give me some ideas Thanks

spiritas1004 avatar Apr 09 '18 11:04 spiritas1004

please note, that as mentioned in the python docs, the pyrealsense PyPi package is a community maintained project that only supports the legacy librealsense v1.12.1 It is recommended that you follow the instructions on the linked page to install pyrealsense2, which works with the Realsense SDK 2.0

lramati avatar May 21 '18 15:05 lramati