How Do I Install Different Versions of Python on Linux?
Contents

How do I install a specific version of Python in Linux?

You can also download latest version in place of specified below.

  1. cd /usr/src sudo wget Now extract the downloaded package.
  2. sudo tar xzf Python-3.5.2.tgz. …
  3. cd Python-3.5.2 sudo ./configure sudo make altinstall. …
  4. $ python3.5 -V Python 3.5.2.

8 окт. 2015 г.

How do I install two Python versions on Linux?

Install that version using “make install”. Install all other versions using “make altinstall”. For example, if you want to install Python 2.5, 2.6 and 3.0 with 2.6 being the primary version, you would execute “make install” in your 2.6 build directory and “make altinstall” in the others.

Robert Thorne

Robert Thorne

Automotive & Future Transportation Editor

Robert Thorne covers electric vehicle innovations, autonomous driving systems, global mobility trends, and automotive engineering developments.

Share this article
Twitter Facebook Pinterest