无法从源安装python

时间:2016-07-19 20:30:43

标签: python python-2.7

每次我尝试从源代码安装install python 2.7.12时,运行命令sudo make install时出错并且python安装失败。但是,运行make时没有错误。可能是什么错误?

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

1 个答案:

答案 0 :(得分:4)

由于错误太模糊,很难分辨。我会尝试再次运行配置文件,并提供有关系统的可能选项。没有更多信息,我只能猜测Makefile配置不正确。

您也可以尝试使用apt-get和deadsnake存储库下载它。试试吧:

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

This link表明它应该给你python 2.7.12