install OpenCV for python3 in Jetson Nano

One final note… Followed all the procedure stated here:

https://pythops.com/post/compile-deeplearning-libraries-for-jetson-nano

However, the library is not correctly linked.

As per

https://docs.donkeycar.com/guide/robot_sbc/setup_jetson_nano/

it is necessary to create a link to it

# Go to the folder where OpenCV's native library is built
cd /usr/local/lib/python3.6/site-packages/cv2/python-3.6
# Rename
mv cv2.cpython-36m-xxx-linux-gnu.so cv2.so
# Go to your virtual environments site-packages folder if previously set
cd ~/env/lib/python3.6/site-packages/
# Or just go to your home folder if not set a venv site-packages folder
cd ~
# Symlink the native library
ln -s /usr/local/lib/python3.6/site-packages/cv2/python-3.6/cv2.so cv2.so

NOTE that it is almost mandatory to create a virtual environment in order to properly install tensorflow, scipy and keras, and always a best practice.

1 Like