Score:1

How to upgrade python3-venv to 3.9 version in ubuntu 18.04?

uz flag

I need to install tensorflow which requires python version > 3.7 because of which I had to upgrade the python version in ubuntu 18.04 from 3.6 to 3.9. I upgraded to python 3.9 using:

sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get update
sudo apt-get install python3.9
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 1
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.9 2
sudo update-alternatives --config python3
Then select 2

Then I installed python3-venv corresponding to version 3.9. I do it using:

 sudo apt-get install python3.9-dev python3.9-venv

Now I create a virtual environment using

python3.9 -m venv dl4cv

My question is: Will the created dl4cv correspond to the python version 3.9 or 3.6? Also is this process to create the virtual environment in the updated 3.9 version correct?

vn flag
That ought to work. Have you tried running the command you posted above? To verify the version, you could then run `dl4cv/bin/python --version`. If it shows `Python 3.9.X` then you are all set.
syumaK avatar
cn flag
E: Unable to locate package python3.9-dev E: Unable to locate package python3.9-venv
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.