My system python3 version is 3.6. I need to install python3.9 in a directory, and run it.
First we need to add the deadsnakes repo for new python versions. Otherwise Ubuntu cannot get newer versions.
sudo add-apt-repository ppa:deadsnakes/ppa sudo apt update sudo apt install python3.9 python3.9-venv python3.9-dev sudo apt install python3-venv python3.9 -m venv venv
Now, we have created a virtualenv folder named venv.
For django, you will need to install all the requirements again.
Joel G Mathew, known in tech circles by the pseudonym Droidzone, is an opensource and programming enthusiast.
His favorite pastime is grappling with GNU compilers, discovering newer Linux secrets, writing scripts, hacking roms, and programs (nothing illegal), reading, blogging. and testing out the latest gadgets.
When away from the tech world, Dr Joel G. Mathew is a practising ENT Surgeon, busy with surgeries and clinical practise.