Ubuntu安装python 3.6版本(-)

安装python在网上查了很多教程。
很多基本上第一句都是

sudo add-apt-repository ppa:jonathonf/python-3.6
或者是:
sudo add-apt-repository ppa:fkrull/deadsnakes

我马上迷惑了,「ppa:jonathonf」与「ppa:fkrull」什么区别,有的地方解释说是源不一样,我不太明白,没有找到具体相关解释,我又怕有问题,所以果断放弃了这种方法。
找到了另一种安装方法:

wget https://www.python.org/ftp/python/3.6.0/Python-3.6.0.tar.xz

我看到了python.org这个地方,使我安心了很多,至少我明白这是个官网的意思。所以按照这个教程继续下去。下面是这个教程链接地址:

http://www.jb51.net/article/101354.htm

我千辛万苦的执行到了这一步,问题来了。

sudo make install

安装最后几行来了问题。

ipimport.ZipImportError: can't decompress data; zlib not available
make: *** [install] Error 1

在百度上一查,说是缺少zlib相关依赖包。那只能下载安装。

http://www.zlib.net/

我下载了这个压缩格式:Jean-loup Gailly包,并且也要安装。


屏幕快照 2018-05-27 18.29.38.png

1.tar -xvf zlib-1.2.11.tar.gz
2.cd zlib-1.2.11
3.make
4.sudo make install

我觉得我应该可以了,这个东西应该是安装好,可以进行下一步了。

The directory '/home/user/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/user/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Requirement already up-to-date: setuptools in /usr/local/lib/python3.6/site-packages
Requirement already up-to-date: pip in /usr/local/lib/python3.6/site-packages

我还是不太懂,这是成功了呀还是不成功呀,还是有问题呀,还是怎么了。我在研究研究啊,可喜的是至少和第一次安装不一样,这个没有错误。

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容