0

My default version of python3 is 3.7.5. I need to install 3.6.5. I was told that ubuntu 19.10 depends on 3.7.5. So I cannot replace it. I need them to be side by side. I have ran these lines on the command prompt:

wget -P ~/Downloads https://www.python.org/ftp/python/3.6.5/Python-3.6.5.tar.xz
cd ~/Downloads
tar -xJf Python-3.6.5.tar.xz
cd Python-3.6.5

./configure
make
make test

After the "make test" command is entered, some tests failed. And it has been running for hours.

The final line is either:

sudo make install

or

sudo make altinstall

I was told that the first option will replace 3.7.5, while the second will install them side by side.

Questions:

  1. Since some tests failed, can I still install 3.6.5? What does it mean that the tests are failing.
  2. is "sudo make altinstall" the right command to install them side by side? If so, what is the command to run 3.6.5, if 3.7.5 will still be the default?
  • 1
    maybe this post is helpful for you? I mean the solution using asdf https://stackoverflow.com/questions/2547554/multiple-python-versions-on-the-same-machine – Gartmair Jan 01 '20 at 23:30
  • @Gartmair yup that seems to help. But what about the fact that the tests are failing? – Bear Bile Farming is Torture Jan 01 '20 at 23:44
  • 1
    You don't need to compile it yourself. Check out [How do I install a different Python version using apt-get?](https://askubuntu.com/q/682869/301745) on Ask Ubuntu – wjandrea Jan 01 '20 at 23:58
  • 1
    you should check versions precompiled by [deadsnakes](https://launchpad.net/~deadsnakes/+archive/ubuntu/ppa). On Linux Mint (based on Ubuntu 18.04) I used it (with `apt-get`) and now I have at the same time 2.7, 3.5, 3.7, 3.8. Once I had even 2.4, 2.6, 2.7, 3.5, 3.6, 3.7 at the same time. – furas Jan 02 '20 at 02:19

2 Answers2

0

How about using version manager?

Example.

M.S Youn
  • 36
  • 5
0
  1. It depends on what tests are failing. It could have been some packages which are currently not required/not being used. So yes, you can continue with the install and check.

  2. Yes it is correct. The corresponding versions can be invoked by mentioning the absolute path until the python folder. For example /usr/bin/python3.6.5 or /usr/bin/python3.7.5