CentOS 6.5升级Python和安装IPython

CentOS 6.5升级Python和安装IPython

http://www.noanylove.com/2014/10/centos-6-5-sheng-ji-python-he-an-zhuang-ipython/


安装python爬虫scrapy踩过的那些坑和编程外的思考:
http://www.cnblogs.com/rwxwsblog/p/4557123.html




===================================================
安装pip

wget https://bootstrap.pypa.io/get-pip.py
python get-pip.py

报错:
zipimport.ZipImportError: can't decompress data; zlib not available
ImportError: cannot import name HTTPSHandle


[root@SC-070 ~]# ./setuptools-0.6c11-py2.7.egg 
Traceback (most recent call last):
  File "<string>", line 1, in <module>
zipimport.ZipImportError: can't decompress data; zlib not available
解决方法:
1、安装依赖zlib、zlib-devel,openssl和openssl-devel
2、重新编译安装Python

./configure
编辑Modules/Setup文件
找到下面这句,去掉注释
#zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz
重新编译安装:make & make install
===================================================

猜你喜欢

转载自mutourenoo.iteye.com/blog/2315232
今日推荐