
In addition to the above example making use of make altinstall instead of make install, there are many ways to install a new version of Python in a "closed" environment without interfering with the primary installation of the OS distribution.įor example, here's how to install Python under /opt by creating a "closed" environment ( /opt is indicated for installations of third party packages, which are not part of the official OS distribution, which installs rather in /bin, /usr/bin). It is important not to modify (or destroy) the Python version installed by the Ubuntu Linux distribution, because there are dependencies to be respected within the OS distribution itself. How to protect the pre-installed Python of the OS distribution In any case such an error would not prevent us to use this new Python version, freshly installed. pythonstartup (which is why we compiled with the libreadline-dev dependency). Indeed, while launching this new version of Python, we could see an import error package for readline from the launching file. Type "help", "copyright", "credits" or "license" for more information. usr/bin/install −c python /usr/local/bin/python2.7.2 (rather than "sudo make install" to not interfere with the OS pre-installed version )


Gcc -pthread -c -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3
