pip类似RedHat里面的yum,安装Python包非常方便
安装pip方法:
1、安装环境:ubuntu-14.04.2
sudo apt-get install python-pip python-dev build-essential sudo pip install --upgrade pip sudo pip install --upgrade virtualenv
2、安装环境:centos 6.6 (红帽的系统也可以)
wget --no-check-certificate https://github.com/pypa/pip/archive/1.5.5.tar.gz
tar -zxf 1.5..tar.gz
cd pip-1.5./ python setup.py install 然后就可以用pip 安装其他模块了
例如 pip install requests 执行报以下错误:
Traceback (most recent call last):
File "setup.py", line , in <module>
from setuptools import setup, find_packages
ImportError: No module named setuptools 解决方法:
wget http://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c11.tar.gz
tar zxvf setuptools-.6c11.tar.gz
cd setuptools-.6c11
python setup.py build
python setup.py install tar zxvf setuptools-.6c11.tar.gz;cd setuptools-.6c11;python setup.py build;python setup.py install python3 的安装方法可以参考:http://www.tuicool.com/articles/j2ueiir