I've just upgraded to Ubuntu 20.04. I was working with a python 3.7 project using Django inside a virtual environment, so I was confident even with the upgraded distro (which involved the installation of python 3.8) my venv would still worked. Unfortunately, that's not the case: when I activate my venv, the interpreter of python is still the 3.8 version, and nothing works. python 3.7 is completely missing. What can I do to restore my project?
Show activity on this post. You will see something like this: Running virtualenv with interpreter C:\Python37\python.exe Using base prefix 'C:\Python37' New python executable in C:\Users\XXXX\Documents\GitHub\MyProject\venv\Scripts\python.exe Installing setuptools, pip, wheel... done.
Virtualenv has been deprecated in Python 3.8.
Same problem for me. This is my solution if you do not want to upgrade everything (perhaps not all package are upgradable).
Install python 3.7 which is gone with upgrade to ubuntu 20
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get update
sudo apt-get install python3.7
in your virtualenv dir (e.g env/) edit last line in pyenv.cfg
version = 3.7
set back soft link of python3 in env/bin linking back to 3.7
ln -s /usr/bin/python3.7 python3
You may need to delete old symlik before creating new one
Now, should work: it does for me!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With