
If instead you use “make install”, the “python3.6” binary is created, same as before – but in ADDITION to this, the “python3” symlink will be overwritten with one that points to “python3.6”. If you follow this page’s instructions and use “make altinstall”, a new binary will be added called “python3.6” Running “python3.6” gives 3.6.2 running “python3.4” gives 3.4.3 running “python3” gives 3.4.3 (because of the symlink). If you run “python3”, you enter a Python 3.4.3 prompt – because there is a symlink called “python3” pointing to a binary called “python3.4”. Running “python2” gives the same result, of course. If you run “python”, you enter a Python 2.7.6 prompt – because there is a symlink called “python” pointing to a symlink called “python2” pointing to a binary called “python2.7”. Python 2.7.6 and Python 3.4.3 are installed by default on Ubuntu 14.04. >All files and installed using “sudo make altinstall” contain the major and minor version and can thus live side-by-side: “$/bin/pythonX.Y”.Īn example to illustrate what this means:

To paraphrase from the Python-3.6.2/README.rst file: The rest of this comment is optional only read if you want a pedantic breakdown of how python versions are managed. You should be able to use the new version by running “python3.6” (so your version check would be “python3.6 -V”, not “Python-3.6 -V”). You might have already figured this out, but in case you haven’t – your comment uses an incorrect binary name. Pip 9.0.1 from /usr/local/lib/python3.6/site-packages (python 3.6) This will also configure PIP for you to install Python modules. Let’s check the version installed of python using the below command. Make altinstall is used to prevent replacing the default python binary file /usr/bin/python.įinally, you have successfully installed Python 3.6 on your system. With make command altinstall, to install it as separate Python, This will not overwrite the existing installation. We use -enable-optimizations option with configure command to enable additional supports like SSL, bz2 support. Now use below set of commands to compile Python source code on your system.


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

Sudo apt-get install libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-devĭownload Python using following command from python official site. sudo apt-get install build-essential checkinstall Use the following command to install prerequisites for Python before proceeding to the next steps.
