Error while installing Real Sense software to tthe Mac OS
Hello!
I am trying to download real sense for the whole day. I have tried everything from the these links from previous posts.
https://github.com/IntelRealSense/librealsense/blob/master/doc/installation_osx.md
but when I run the last part with CMake it gives me an error:
CMake Error at CMakeLists.txt:5 (include):
include could not find requested file:
CMake/lrs_options.cmake
CMake Error at CMakeLists.txt:6 (include):
include could not find requested file:
CMake/connectivity_check.cmake
CMake Error at CMakeLists.txt:9 (if):
if given arguments:
"OR" "OR"
Unknown arguments specified
I don't know how to handle it. I really want to start using the camera.
-
Hello Begaiym Kudainazarova
I will be happy to support you through the Mac installation process. In the meantime, some RealSense Mac users have found that the solution to their installation problems was to clone the RealSense SDK using the instruction below:
git clone https://github.com/IntelRealSense/librealsense
An example of a Mac installation guide that uses this method is in the link below.
https://github.com/IntelRealSense/librealsense/issues/6402#issuecomment-643304216
Could you also answer the following questions please:
- Which MacOS version are you using
- Does your Mac have an Intel processor chip or is it a recent model with Apple Silicon M1
-
Hello MartyG! Thanks a lot for your consideration!
I am trying to set up as it's shown in the link you sent me. When I set up according to python2.7 i don't get any errors but I am trying it with python3.8 I get the following error:
[100%] Built target pybind11
-- pybind11 v2.6.2
CMake Error at build/third-party/pybind11/tools/FindPythonLibsNew.cmake:133 (message):
Python config failure:
Call Stack (most recent call first):
build/third-party/pybind11/tools/pybind11Tools.cmake:45 (find_package)
build/third-party/pybind11/tools/pybind11Common.cmake:201 (include)
build/third-party/pybind11/CMakeLists.txt:188 (include)
-- Configuring incomplete, errors occurred!
See also "/Users/begaiym/librealsense/build/CMakeFiles/CMakeOutput.log".
See also "/Users/begaiym/librealsense/build/CMakeFiles/CMakeError.log".
I am using Mac version 11.2.1 with an Intel Core i5 processor.
-
The -DPYTHON_EXECUTABLE path in the 3.8 version in the guide looks like it may be customized to the path to Python 3.8 on the guide writer's computer in particular. You may have a different path to 3.8 on your own Mac. You can find the path on your own computer using the which python3 command.
For example, here is a command that someone successfully used with Python 3.8 (similar to the guide's but shorter):
-DPYTHON_EXECUTABLE=/Library/Frameworks/Python.framework/Versions/3.8/bin/python3
-
I have tried with the Python pathon on my computer but I still have the same error. And I tried to do everything as this link
shows and seems like it compiled without any problems but when I run my python script it says that "no module pyrealsense2". I use python within anaconda, can it create any problems?
-
When I try to run
cmake .. -DBUILD_EXAMPLES=true -DBUILD_WITH_OPENMP=false -DHWM_OVER_XU=false -DBUILD_PYTHON_BINDINGS=true -DPYTHON_EXECUTABLE=/Library/Frameworks/Python.framework/Versions/3.8/bin/python3 -DCMAKE_MACOSX_RPATH=ON -DCMAKE_INSTALL_RPATH="/usr/local/realsense/python/3.8.3" -G "Unix Makefiles"
I get the following error:
-- Building libcurl enabled
CMake Error at /usr/local/Cellar/cmake/3.21.0/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the
system variable OPENSSL_ROOT_DIR (missing: OPENSSL_CRYPTO_LIBRARY
OPENSSL_INCLUDE_DIR)
Call Stack (most recent call first):
/usr/local/Cellar/cmake/3.21.0/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
/usr/local/Cellar/cmake/3.21.0/share/cmake/Modules/FindOpenSSL.cmake:574 (find_package_handle_standard_args)
CMake/external_libcurl.cmake:56 (find_package)
CMake/global_config.cmake:93 (include)
CMakeLists.txt:44 (global_set_flags)
-- Configuring incomplete, errors occurred!
-
There are few references on using the RealSense Python wrapper with Conda, and none about using the wrapper with Conda on Mac. So it is going to be difficult to troubleshoot your Conda-based installation.
Having said that, the OpenSSL error is a known one with Mac installations.
https://github.com/IntelRealSense/librealsense/issues/9422#issuecomment-881381506
-
I solved that as well, thank you!
Now I finished the set up and opened python through VSCode. I can import pyrealsense2 as rs but then I don't have any commands. like I want to run rs.pipeline() but it gives me the error which says
AttributeError: module 'pyrealsense2' has no attribute 'pipeline'
Does it mean that the library wan't fully set up?
-
This particular 'pipeline' error tends to be easier to solve than the 'no module' error. A RealSense user with a Mac offers advice in the link below that worked for them in their particular case.
https://github.com/IntelRealSense/librealsense/issues/7540#issuecomment-706737724
In the same discussion, a couple of other RealSense users said that what worked for them was simply to modify the import instruction to:
import pyrealsense2.pyrealsense2 as rs
In other words, use 'pyrealsense2' twice in the same line, separated by a full stop.
-
Thank you! the solution to import pyrelasense2 twice worked for me and now I don't have any errors with modules. However, when I tried to run this example
It gives me a connection error:
sock.connect((host, port))
ConnectionRefusedError: [Errno 61] Connection refusedThe camera is connected to my computer.
-
Great to hear that you made progress!
I have not seen that particular error with librealsense, though researching the error indicates that it can occur in a range of other non-RealSense projects in Python.
Did you save the script code of tutorial-1-depth.py into a script file of your own with the same name and then launch that file in the terminal with the command python3 tutorial-1-depth.py
-
The example programs provided by the Python wrapper's examples section typically incorporate OpenCV references and have explanatory notes within the code. Here are two of those examples that are specifically named as OpenCV Python programs:
Please sign in to leave a comment.
Comments
12 comments