2

I'm trying to install Python 3.7.0 on WSL (Ubuntu 20.04). Tried:

sudo apt install python3.7.0

But it says that there is no such package. Using:

sudo apt install python3.7

installs python 3.7.9 and not 3.7.0.

How can I reinstall 3.7.9 and install 3.7.0 instead?

vesii
  • 193
  • 3
  • 15
  • Was there some big change in the 3.7.x branch that causes you to *not* install the latest 3.7 release? If so, you're probably stuck building it from source (https://www.python.org/downloads/release/python-370/). – ajgringo619 Nov 30 '20 at 18:55
  • @ajgringo619 It's a requirement in a course I take. Different versions give different outputs so I need to stick with 3.7.0 – vesii Nov 30 '20 at 18:56
  • Why do you want to install this python version, is it for development purposes of a user? I guess that python3.7 is an alias used by the system and it's recommended not to force it to any version you want and leave only your package management tools to update it, if and when they need. – thanasisp Nov 30 '20 at 18:56
  • @thanasisp See the comment above. Unfortunately I have to use 3.7.0. I also tried 3.7.9 but getting different outputs. Other members said that moving to 3.7.0 solved it. – vesii Nov 30 '20 at 18:58
  • I suggest you to have a look into [this post](https://unix.stackexchange.com/questions/9711/what-is-the-proper-way-to-manage-multiple-python-versions). You can have many different python versions for development and setup your dev environment, but it is not recommended to touch system python. For a minor version number it could be better, but not recommended. – thanasisp Nov 30 '20 at 19:04

1 Answers1

1

Look no further: https://github.com/pyenv/pyenv

Most distros don't have the luxury of maintaining multiple python/ruby/php releases because it involves a lot of hard work and it's often not even possible because these languages feature modules with intricate dependencies.

Artem S. Tashkinov
  • 26,392
  • 4
  • 33
  • 64