标签:
安装pip:
wget https://bootstrap.pypa.io/get-pip.py --no-check-certificate
sudo python get-pip.py
建立软连接:
ln -s /usr/local/bin/pip /usr/bin/pip
如果用apt-get install python-pip 有可能出现如下问题:
Exception: Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main status = self.run(options, args) File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 278, in run requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle) File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1178, in prepare_files url = finder.find_requirement(req_to_install, upgrade=self.upgrade) File "/usr/lib/python2.7/dist-packages/pip/index.py", line 252, in find_requirement for page in self._get_pages(locations, req): File "/usr/lib/python2.7/dist-packages/pip/index.py", line 387, in _get_pages page = self._get_page(location, req) File "/usr/lib/python2.7/dist-packages/pip/index.py", line 568, in _get_page session=self.session, File "/usr/lib/python2.7/dist-packages/pip/index.py", line 670, in get_page resp = session.get(url, headers={"Accept": "text/html"})
pip配置豆瓣源:
[global] trusted-host = pypi.douban.com index-url = http://pypi.douban.com/simple
标签:
原文地址:http://www.cnblogs.com/styier/p/5657567.html