shibli049's Blog


shibli049's Blog

Install New Python-3+ Releases on Ubuntu

Install New Python-3+ Releases on Ubuntu

shibli049's photo
·Dec 30, 2016·

1 min read

Play this article

Python, 3.7.1 released recently. It has some exciting features. After downloading python source from, I faced few problems in installing from source, like this zlib library problem. There were so many solutions, yet none of them are working for me. After searching for answers and banging my head on walls for a while, I finally found the solution on official python site’s build dependency documentation.

sudo apt-get build-dep python3.6

If you see something like this E: You must put some 'source' URIs in your sources.list, Open Software & Updates and enable:Source code, you can see details on this askubuntu Q&A.

If that package is not available for your system, try reducing the minor version until you find a package that is available in your system’s package manager.

Now, extract the source.

tar xzvf Python-3.*.tgz

Go to the extracted folder.

cd Python-3.*

Next, configure with the flag: --enable-optimizations

./configure --enable-optimizations

Then execute,


And, finally:

sudo make altinstall

*Alternatively, you can run the command: sudo make install. But, this will replace your default python version with this new one, which may cause problems to your OS, and other libraries using default python.

Share this