Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

unable to install python from source

Every time I try to install install python 2.7.12 from source I get error while running the command sudo make install and python installation fails. However there is no error while running make. What could be the probable error?

Compiling /usr/local/lib/python2.7/xml/parsers/__init__.py ...
Compiling /usr/local/lib/python2.7/xml/parsers/expat.py ...
Listing /usr/local/lib/python2.7/xml/sax ...
Compiling /usr/local/lib/python2.7/xml/sax/__init__.py ...
Compiling /usr/local/lib/python2.7/xml/sax/_exceptions.py ...
Compiling /usr/local/lib/python2.7/xml/sax/expatreader.py ...
Compiling /usr/local/lib/python2.7/xml/sax/handler.py ...
Compiling /usr/local/lib/python2.7/xml/sax/saxutils.py ...
Compiling /usr/local/lib/python2.7/xml/sax/xmlreader.py ...
Compiling /usr/local/lib/python2.7/xmllib.py ...
Compiling /usr/local/lib/python2.7/xmlrpclib.py ...
Compiling /usr/local/lib/python2.7/zipfile.py ...
make: *** [libinstall] Error 1
like image 324
aradhyamathur Avatar asked Jul 19 '16 20:07

aradhyamathur


1 Answers

It's hard to tell since the error is so vague. I would try running the configure file again with possible options about you system. Without much more information, I can only guess you Makefile isn't configured right.

You can also try downloading it using apt-get with the deadsnake repository. Just try:

add-apt-repository ppa:fkrull/deadsnakes-python2.7
apt-get update
apt-get install python2.7

This link shows that it should give you python 2.7.12

like image 182
Dylan Avatar answered Nov 15 '22 11:11

Dylan