How to install opencv or any other package in two different versions of python, like 3.6 and 3.7

Hello Im in big trouble, and hope someone could help me, please!!!

I got the Jetson Nano where I got installed on python 3.6.9 the opencv but When i wanted to try to install the adafruit servo kit library, i read that it only work on python 3.7 and up, so I installed the 3.7 but when i try to use the command to install opencv again it failed, so I tried everythin since makin the principal python the 3.7 and to unistall it and re install it bit nothing works for me!

Can someone please help me to install open cv in the two version of python, like 3.6 and 3.7?

Thank u

You may install virtualenv (external guide) or miniconda to create virtual environments for different python versions, then install other python modules in the corresponding virtual environments.

thank u, but is there another way to do it? like from default, or the best way is to do it in virtual envs? I need opencv and the adafruit servo kit library in the same python version…

another thing! I already got 3.6 and 3.7 in my jetson I only need to create the virtual enviroment and reference the python version to ir and to program it with visual studio code how is it?

I hate when that happens. I’ve even gone as far as starting fresh system install.

But, I find changing the default python with update-alternatives to be a good solution especially when using python to install system packages like meson.

I tried this but it doesn’t work for me

what happened

Hi,

Below is an example that building OpenCV for python 3.6 on a default python 3.8 environment.

Suppose you can build one for python 3.7 in similar steps.
Thanks.

I really dont understand at all of this

Im trying to use the virtual enviroment but when I put the pip install python-opencv it gets stuck

I change manually to the 3.7 version but when I put the command to add the opencv to it with the package of the adafruit servo kit the termianl says that I’ve already had opencv but its a lie its only in the python 3.6.

I also try to putteh comand python3 as python3.7 but also fails

Please I need your help I think I broke everything and im doing my tesis in here please

Hi,
Is it possible to re-flash the system and then follow the steps? So that you can have a clean environment.

Not so posible but i got another sd with a clean image I can try it there

Hi,

Do you want the below library?

I cannot find the python 3.7+ limitation.
Have you tried to compile it on Nano?

Thanks.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.