Score:0

Can't use opencv in upgraded Python3

kw flag

I upgraded my Python 3.6.9 to Python 3.9. Prior to upgrading, I was able to use opencv but somehow I can't use opencv and other libraries (matplotlib.pyplot etc.). What is problem with that ?

I also tried upgrading opencv but it gives me this line 0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded

Any help is appreciated.

Hannu avatar
ca flag
Ubuntu is best updated only using `apt` or `apt-get`, the builtin package management system. Going outside that for e.g. a newer python has a tendency to create e.g. version conflicts; icky issues that are hard to solve. Most of the time the actual gain of a (sucessful) update is minuscule.
kadir_ercan avatar
kw flag
Thank you for advice. I will probably install anaconda to resolve whole situation.
Score:0
cn flag

Don't change the installed version of Python3. Doing so breaks your system, as you have discovered to your sorrow.

Repair your system by restoring the original version of Python3.

You can have multiple Python3 versions. One easy method is to use virtual environments (like venvs or containers or VMs) to contain each version. Another is to install non-packaged Python3 versions manually to /usr/local (instead of /usr/share); those won't conflict with your system python3 in /usr/share.

kadir_ercan avatar
kw flag
Actually, I am planning to install anaconda where it has own virtual environments and python 3.9, since I have to use tensorflow requiring more than 3.7 version. Thanks for advice
user10489 avatar
in flag
If you install anaconda, I'd recommend installing it in your home directory with normal user permissions.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.