If you refer to this link when using RealSense, it will work, but using pyenv is a bit of a hassle. I needed it, so I wrote a memo at that time.
I thought this would work, but since the destination of sudo make install
is not the folder of each version of pyenv, modules such as pyrealsense2
are not referenced in the environment switched by pyenv.
Therefore, you need to make pyenv aware of modules such as pyrealsense2
.
Check that the installation destination is output when sudo make install. It looks like this in my environment
-- Up-to-date: /usr/local/Cellar/[email protected]/3.8.4/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pyrealsense2/pybackend2.2.38.1.cpython-37m-darwin.so
-- Up-to-date: /usr/local/Cellar/[email protected]/3.8.4/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pyrealsense2/pybackend2.2.cpython-37m-darwin.so
-- Up-to-date: /usr/local/Cellar/[email protected]/3.8.4/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pyrealsense2/pybackend2.cpython-37m-darwin.so
-- Installing: /usr/local/Cellar/[email protected]/3.8.4/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pyrealsense2/pyrealsense2.2.38.1.cpython-37m-darwin.so
-- Up-to-date: /usr/local/Cellar/[email protected]/3.8.4/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pyrealsense2/pyrealsense2.2.38.cpython-37m-darwin.so
-- Up-to-date: /usr/local/Cellar/[email protected]/3.8.4/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pyrealsense2/pyrealsense2.cpython-37m-darwin.so
The most stable is
-- Up-to-date: /usr/local/Cellar/[email protected]/3.8.4/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pyrealsense2/pybackend2.cpython-37m-darwin.so
-- Up-to-date: /usr/local/Cellar/[email protected]/3.8.4/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pyrealsense2/pyrealsense2.cpython-37m-darwin.so
I'll link them. In my environment, I installed it via Brew, so it looked like the following. (Please go to your pyenv folder for each)
$ cd /usr/local/var/pyenv/versions/3.7.7/lib/python3.7/site-packages
$ ln -s /usr/local/Cellar/[email protected]/3.8.4/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pyrealsense2/pyrealsense2.cpython-37m-darwin.so pyrealsense2.so
$ ln -s /usr/local/Cellar/[email protected]/3.8.4/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pyrealsense2/pybackend2.cpython-37m-darwin.so pybackend2.so
It is OK if you do this in the folder of each version
Recommended Posts