Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I upgrade Python to a specific version?

Tags:

python

I am currently working on Python 2.6.5 and I would like to upgrade to Python 2.6.6.

Is there a way I can do so?

like image 300
ScoRpion Avatar asked Nov 26 '11 06:11

ScoRpion


1 Answers

In Linux:

  1. Select the version that you're looking for: https://www.python.org/downloads/
  2. From the appropriate version's page, copy the download link. (eg. https://www.python.org/ftp/python/3.8.3/Python-3.8.3.tgz)
  3. Go to the directory you want to download the compressed package to and run wget "https://www.python.org/ftp/python/3.8.3/Python-3.8.3.tgz"
  4. In that same directory, run tar -zxvf Python-3.8.3.tgz to extract Python
  5. cd into the directory where Python has been extracted to
  6. Run ./configure
  7. Run make
  8. Run make install
  9. Run python --version to check that the installation was successful

Python should now be installed at the desired version.

like image 200
Lemmings19 Avatar answered Oct 03 '22 19:10

Lemmings19