Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Script not working with Python 3.7.5 #68

Open
waqas95ali opened this issue Aug 20, 2022 · 1 comment
Open

Script not working with Python 3.7.5 #68

waqas95ali opened this issue Aug 20, 2022 · 1 comment
Labels
enhancement New feature or request Python snake related issue

Comments

@waqas95ali
Copy link

Hi

I have JETSON NANO developer kit.

I installed Python 3.7.5 as it was needed for Adafruit libraries (pip install adafruit-circuitpython-servokit)

Then I set Python3.7.5 as the default Python3:
sudo rm /usr/bin/python3
sudo ln -s /usr/bin/python3.7 /usr/bin/python3

Then I installed opencv 4.1.1 using your script and command:
./build_opencv.sh 4.1.1

But after that when I tried to "import cv2", I got the error:
File , line1 in
ModuleNotFoundError: No module named 'cv2'

Can you please modify the script so it includes support for Python3.7.5 ?

Thanks,
BR,
Waqas

@mdegans
Copy link
Owner

mdegans commented Jan 27, 2023

sudo rm /usr/bin/python3
sudo ln -s /usr/bin/python3.7 /usr/bin/python3

Unfortunately that won't work. Try sudo update-alternatives --config python to change your python systemwide, although that can break many things.

An easier solution is likely to just run build_opencv.sh from an active python3.7 venv. Then cmake will use the venv's python environment variables to find the appropriate python and (should) install the module in your venv. From there you can copy it to any python3.7 path in sys.path.

@mdegans mdegans added enhancement New feature or request Python snake related issue labels Jan 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Python snake related issue
Projects
None yet
Development

No branches or pull requests

2 participants