ModuleNotFoundError: No module named 'pyorbbecsdk'

I tried using the pyorbbecsdk starting by first cloning this: git clone https://github.com/OrbbecDeveloper/pyorbbecsdk.git
then I followed the readme.md file in the repository. Here is what I did after cloning the above repository:

cd pyorbbecsdk
pip3 install -r requirements.txt
mkdir build
cd build
cmake -Dpybind11_DIR=`pybind11-config --cmakedir` ..
make -j4
make install

everything got installed successfully.
Once this was done, I treid using an example that was mentioned in the readme file, here is what I did next:

cd pyorbbecsdk
# set PYTHONPATH environment variable to include the lib directory in the install directory
export PYTHONPATH=$PYTHONPATH:$(pwd)/install/lib/
# install udev rules
sudo bash ./scripts/install_udev_rules.sh
sudo udevadm control --reload-rules && sudo udevadm trigger
# run examples
python3 examples/depth_viewer.py

But then I am getting this error: ModuleNotFoundError: No module named ‘pyorbbecsdk’
How do I install the module because it is not added in pip and so I cannot do a pip install pyorbbecsdk here.

Have you created an VENV virtual environment to run the program?

1 Like

Yeah, so creating the virtual environment solved the issue. Actually I tried in 1 computer without creating a virtual environment and it worked there but that was not the case this time, I suppose there might be some issues with library versions.
Thanks @Nathan for your answer!