CentOS下python安装pip。干货
来源:互联网 发布:黑魂三男性捏脸数据 编辑:程序博客网 时间:2024/05/16 06:06
从pip官网 https://pypi.python.org/pypi/pip 下载pip的源代码
#解压tar -zxvf pip-1.5.5.tar.gz
cd pip-1.5.5
#安装
python setup.py install
如果你没有安装setuptools,而你的机器又没法联网
Traceback (most recent call last): File "setup.py", line 5, in <module> from setuptools import setup, ExtensionImportError: No module named setuptools
sh setuptools-0.6c11-py2.7.egg
----------------------------结果---------------------------------
Adding setuptools 0.6c11 to easy-install.pth fileInstalling easy_install script to /usr/local/binInstalling easy_install-2.7 script to /usr/local/binInstalled /usr/local/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.eggProcessing dependencies for setuptools==0.6c11Finished processing dependencies for setuptools==0.6c11
如果你安装setuptools的过程中出现
zipimport.ZipImportError: can’t decompress data; zlib not
的错误。恭喜你又中了特大奖。解决办法:
1、老老实实把之前安装好的python2.7卸载了。然后用yum安装
2、yum安装依赖zlib、zlib-devel
3、重新编译安装Python
到python安装目录下
编辑Modules/Setup.dist文件
vim Modules/Setup.dist
找到下面这句,去掉注释
#zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz
重新编译安装:
make
make install
重新执行
执行
成功的话继续。。。。sh setuptools-0.6c11-py2.7.egg
cd pip-1.5.5
#安装
python setup.py install
OK。继续。。
运行pip发现如果报。ImportError: cannot import name HTTPSHandle恭喜你又中大奖了。
处理:
1、老老实实把之前安装好的python2.7卸载了。然后用yum安装
3、然后重新编译python。
4、重新安装setuptools、pip(因为在安装setuptools、pip是安装在python目录下的。所以卸载是一起卸载了)
5、执行pip install Scrapy或者easy_install Scrapy
- CentOS下python安装pip。干货
- Centos下python pip安装使用详解
- centos 7 下安装 python 的 pip
- CentOS安装python-pip
- centos下安装PIP
- CentOS 下使用安装 python 包管理工具 pip
- centos下安装Python包管理工具pip的方法总结
- python下安装pip
- CentOS中安装Python-PIP
- CentOS 6.4安装Python pip
- centos 6.5 安装 python pip
- centos 升级python、pip安装
- 【linux】centos 安装 python-pip
- centos下pip安装mysql_python
- centos下怎样安装pip
- centos下pip安装mysql_python
- Centos 6.4 安装Python 2.7 python-pip
- Centos 6.4 安装Python 2.7 python-pip
- 字符留和字节流的总结
- 《Linux Shell脚本攻略》要点笔记总结(阅读心得)之第1章
- C++ primer 习题笔记第5~6章
- 异常简介
- 最优化方法总结
- CentOS下python安装pip。干货
- Android官方技术文档翻译——Gradle 插件用户指南(1-3)
- android开发之Animations的使用(一)
- 中断
- 不较真
- static和extern
- Min Stack
- 自定义异常简介
- [iOS开发] AutoLayout