使用國內pypi源來安裝python包

國內源python

http://pypi.douban.com/  豆瓣linux

http://pypi.hustunique.com/  華中理工大學ide

http://pypi.sdutlinux.org/  山東理工大學ui

http://pypi.mirrors.ustc.edu.cn/  中國科學技術大學spa

使用方法code

手動指定:blog

手動指定源,能夠在pip後面跟-i 來指定源,好比用豆瓣的源來安裝slinter(記得在源地址後面添加simple):ip

$ sudo pip3 install -i http://pypi.douban.com/simple/ splinter
Requirement already satisfied (use --upgrade to upgrade): splinter in /usr/local/lib/python3.4/dist-packages/splinter-0.7.3-py3.4.egg
Downloading/unpacking selenium>=2.47.1 (from splinter)
  http://pypi.douban.com/simple/selenium/ uses an insecure transport scheme (http). Consider using https if pypi.douban.com has it available
  Downloading selenium-2.52.0.tar.gz (809kB): 809kB downloaded
  Running setup.py (path:/tmp/pip_build_root/selenium/setup.py) egg_info for package selenium
    
Installing collected packages: selenium
  Running setup.py install for selenium
    
Successfully installed selenium
Cleaning up...
$

 

 

設置爲默認源:rem

由於不經常使用,並且手動指定pypi源也較方便,故在此不細說,請查閱pip或easy_install的說明文檔或參考其餘博客。文檔

 

詳細參考:http://topmanopensource.iteye.com/blog/2004853

相關文章
相關標籤/搜索