1

sudo apt-get install python3.7

Reading package lists... Done

Building dependency tree

Reading state information... Done

python3.7 is already the newest version (3.7.10-1+bionic2).

0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

N: Ignoring file 'security' in directory '/etc/apt/sources.list.d/' as it has no filename extension root@ubuntu:~# python3 -V Python 3.6.9

Night_Falcon_X
  • 181
  • 2
  • 14
Logesh
  • 21
  • 3
  • Please share more details - how should anybody know how to help if you dump only some output from your console? – Nico Haase Apr 21 '21 at 16:12
  • Does this answer your question? [How to run multiple Python versions on Windows](https://stackoverflow.com/questions/4583367/how-to-run-multiple-python-versions-on-windows) – Tomerikoo Apr 21 '21 at 16:20
  • And for Linux: [Multiple Python versions on the same machine?](https://stackoverflow.com/q/2547554/6045800) – Tomerikoo Apr 21 '21 at 16:21

1 Answers1

2

I presume you are a Linux user. I faced a similar issue when I was trying to install Python 3.9 but when I ran python -V in the terminal, it would tell me I had version 2. I can't guarantee

this will work but it worked for me. If you are using Ubuntu 20.04 a Linux distro, by default you have Python 3.9. In Ubuntu 18 and 16 there is also a Python version pre-installed. In your case, you need to first uninstall Python 3. Using this command in the terminal.

sudo apt-get remove --purge python3

After uninstalling, reinstall as Python 3.9 version using this command:

sudo apt update
sudo apt install software-properties-common
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt install python3.9
python3.9 --version

Again if you're using an editor like Pycharm your base interpreter will be messed up! So please be careful when uninstalling. And this code works on Ubuntu which I presume is what you are working on. Another thing you need to install a repository to get Py 3.9. it's called deadsnakes I've mentioned the code above on how you could install it. I hope you faced no issues. Remember it worked for me but I'm not sure it will work for you. Enjoy with Python 3.9 if the installation is successful :)

Night_Falcon_X
  • 181
  • 2
  • 14