I'm attempting to install both the last version of python 2 which is currently 2.7.14 according to the site, and the latest for v3, even though I don't really need it. (Just to see if I can get any version of python to work)
I only truly need python 2 in order to run an old python program on Ubuntu.
I recently tried installing both versions in the following manner, first:
sudo apt-get install python2.7
After python 2 seems installed, I tried checking the version:
python -V
However, this input returns:
-bash: python: command not found
Same with python 3:
sudo apt-get install python3.6
I get another negative output when checking for the version.
-bash: /usr/bin/python3: No such file or directory
It seems like both versions don't fully install.
I must add an important fact though, the reason why I can't get to install and use any python version on my Ubuntu system is provably because I already removed python 3 previously in this doubtfull manner:
sudo apt purge python3.5-minimal
Since:
sudo apt-get remove python3.5
Wasn't doing the job for the removal of python 3 (It still fully functioned). I feel like I may have deleted something important while trying to propperly re-install python on my sistem.
Why I installed python 3 (Which I did get to work) if all I really need is python 2? The answer is, I didn't know I needed python 2 in order to run this python program, so I thought installing the latest version would be the wisest thing to do. However the developer informed me that the program can only run with python 2 (Once I found out I couldn't run it on 3). So I thought the best thing would be to remove python 3 entirely and install 2 instead, however this hasn't gone so well.
Could I get some orientation on how to propperly fix this mess and install python 2? All I really need is python 2 for executing a program from that version.
Specifications:
Ubuntu version: 17.04
Desired python version: 2.7.14 (Currently at the time of writing this is
latest)
If you find my issue is not concise enough, please ask. I'll try my best at expanding the details (By editing + commenting).
python --version
), in your case, you should be typingpython -V
. – S.Ith Sep 23 '17 at 12:02python-minimal
package installed for /usr/bin/python. You likely don't really need 2.7.14 for an old program, and the version in current 17.04 will do fine. However, 2.7.14 is in 17.10, which will be released next month, which you should upgrade to from 17.04 (as it will be EOL in 3 months after 17.10 is released). – dobey Sep 23 '17 at 12:03python
andpython3
. I also think you think you need a later version of python than you actually need. You really only need the absolute latest version in some extreme extenuating circumstances, which your old program likely doesn't meet. – dobey Sep 23 '17 at 13:19apt-get remove
, you uninstalled a lot of packages, and the number grew up after theapt-get purge
, though bothremove
andpurge
, leave dependencies installed with the package on installation time untouched. So it must be something else. Reinstalling python 2.7.13 should do the trick throughapt install
. – S.Ith Sep 23 '17 at 15:43