pip 기본 서버 변경

pip 는 python 의 가방 관리 도구 로 각종 python 라 이브 러 리 를 편리 하 게 다운로드 하여 설치 할 수 있 습 니 다.예 를 들 어 Django,Flask,Scrapy 등 이 있 지만 매번 pip 를 할 때마다 이상 한 timeout 이 고 다운로드 속도 가 느 립 니 다.나 는 벽 과 약간의 관계 가 있다 고 생각한다.대 리 를 끊 는 것 외 에는
http://pypi.douban.com/ 콩짜개
http://mirrors.aliyun.com/pypi/    (    ,          Orz)  
http://pypi.sdutlinux.org/         (  ,        )
http://e.pypi.python.org/       
http://pypi.hustunique.com/         
http://pypi.mirrors.ustc.edu.cn           

수 동 테스트
<!-- lang: shell -->
pip install web2py -i http://pypi.douban.com/simple

기본 서버 로 설정:
~/.pip/pip.conf 를 엽 니 다(저장 할 수 없 으 면 권한 을 보십시오)다음 내용 을 입력 하 십시오:[global]timeout=6000 index-url=http://pypi.douban.com/simple/ 테스트:
<!-- lang: shell -->
 sudo pip install Scrapy

다음 정 보 를 표시 하면 성공 합 니 다.(국내 에 HTTPS 를 지원 하 는 pypi 서버 가 없 는 것 같 습 니 다.)
Downloading/unpacking Scrapy http://pypi.douban.com/simple/Scrapy/ uses an insecure transport scheme (http). Consider using https if pypi.douban.com has it available http://pypi.douban.com/Scrapy/ uses an insecure transport scheme (http). Consider using https if pypi.douban.com has it available Downloading Scrapy-0.24.4-py2-none-any.whl (444kB): 444kB downloaded Requirement already satisfied (use –upgrade to upgrade): pyOpenSSL in /usr/lib/python2.7/dist-packages (from Scrapy) Requirement already satisfied (use –upgrade to upgrade): six>=1.5.2 in /usr/lib/python2.7/dist-packages (from Scrapy) Downloading/unpacking queuelib (from Scrapy) http://pypi.douban.com/simple/queuelib/ uses an insecure transport scheme (http). Consider using https if pypi.douban.com has it available http://pypi.douban.com/queuelib/ uses an insecure transport scheme (http). Consider using https if pypi.douban.com has it available Downloading queuelib-1.2.2-py2.py3-none-any.whl Requirement already satisfied (use –upgrade to upgrade): lxml in /usr/lib/python2.7/dist-packages (from Scrapy) Downloading/unpacking w3lib>=1.8.0 (from Scrapy) http://pypi.douban.com/simple/w3lib/ uses an insecure transport scheme (http). Consider using https if pypi.douban.com has it available http://pypi.douban.com/w3lib/ uses an insecure transport scheme (http). Consider using https if pypi.douban.com has it available Downloading w3lib-1.10.0-py2.py3-none-any.whl Downloading/unpacking cssselect>=0.9 (from Scrapy) http://pypi.douban.com/simple/cssselect/ uses an insecure transport scheme (http). Consider using https if pypi.douban.com has it available http://pypi.douban.com/cssselect/ uses an insecure transport scheme (http). Consider using https if pypi.douban.com has it available Downloading cssselect-0.9.1.tar.gz Running setup.py (path:/tmp/pip_build_root/cssselect/setup.py) egg_info for package cssselect no previously-included directories found matching 'docs/build' Requirement already satisfied (use –upgrade to upgrade): Twisted>=10.0.0 in /usr/local/lib/python2.7/dist-packages/Twisted-14.0.2-py2.7-linux-x86_64.egg (from Scrapy) Requirement already satisfied (use –upgrade to upgrade): zope.interface>=3.6.0 in /usr/lib/python2.7/dist-packages (from Twisted>=10.0.0->Scrapy) Installing collected packages: Scrapy, queuelib, w3lib, cssselect Running setup.py install for cssselect no previously-included directories found matching 'docs/build' Successfully installed Scrapy queuelib w3lib cssselect Cleaning up…

좋은 웹페이지 즐겨찾기