推荐学习书目
› Learn Python the Hard Way
Python Sites
› PyPI - Python Package Index
› http://diveintopython.org/toc/index.html
› Pocoo
值得关注的项目
› PyPy
› Celery
› Jinja2
› Read the Docs
› gevent
› pyenv
› virtualenv
› Stackless Python
› Beautiful Soup
› 结巴中文分词
› Green Unicorn
› Sentry
› Shovel
› Pyflakes
› pytest
Python 编程
› pep8 Checker
Styles
› PEP 8
› Google Python Style Guide
› Code Style from The Hitchhiker's Guide
alphadog619
V2EX  ›  Python

请教各位,你们的 pip 源如何设置的?

  •  1
     
  •   alphadog619 · Dec 28, 2016 · 6012 views
    This topic created in 3603 days ago, the information mentioned may be changed or developed.
    如题,安装时下载速度如何?我按照搜素到的一些方法,设置为阿里云的镜像,但是最近速度很慢,最高十几 kb ,基本上都是几 kb ,经常 time out ,让人抓狂啊
    Supplement 1  ·  Dec 30, 2016
    在网上找了好久,终于解决了 找到一位大神的办法,主要之前设置的豆瓣镜像的地址不对,这个是 https 的,实测下载速度飞快,希望可以帮到大家:

    python3 一行流:

    windows 系统,将以下一行代码粘贴到 python IDLE 中回车执行,将会自动建立 pip.ini,把 pip 源默认为豆瓣源。

    import os ; ini = "[global]\nindex-url = https://pypi.doubanio.com/simple/\n"; ; pippath=os.environ["USERPROFILE"]+"\\pip\\" ; exec("if not os.path.exists(pippath):\n\tos.mkdir(pippath)"); open(pippath+"/pip.ini","w+").write(ini)
    19 replies  •  2017-01-04 13:41:51 +08:00
    dofine
    dofine
    Dec 28, 2016❤️1
    1
    hujianxin
    hujianxin
    Dec 28, 2016❤️1
    2
    `cat ~/.pip/pip.conf`

    ```
    [global]
    index-url=https://pypi.douban.com/simple
    ```
    sylecn
    sylecn
    Dec 28, 2016❤️1
    3
    ~/.pip/pip.conf

    [global]
    index-url = https://pypi.tuna.tsinghua.edu.cn/simple
    alphadog619
    alphadog619
    OP
    Dec 28, 2016
    4
    谢谢以上几位,阿里、豆瓣、清华的镜像都试过了,一个 django 都装不上,也许是我网络有问题
    WildCat
    WildCat
    Dec 28, 2016 via iPhone
    5
    http_proxy
    nyaruko
    nyaruko
    Dec 28, 2016❤️1
    6
    我是自己用 nexus oss 搭的代理源,通过国外的代理服务器直接连接官方源
    Mark24
    Mark24
    Dec 28, 2016
    7
    @alphadog619 只保留一个源试试,比如豆瓣
    wyntergreg
    wyntergreg
    Dec 28, 2016
    8
    没设置过,速度尚可
    way2exp
    way2exp
    Dec 28, 2016
    9
    你的网有问题 换运营商才是上策
    dsg001
    dsg001
    Dec 28, 2016
    10
    默认设置,速度不错
    pheyer
    pheyer
    Dec 28, 2016
    11
    今天亲测,豆瓣的源很快
    pheyer
    pheyer
    Dec 28, 2016❤️1
    12
    我直接在命令上加-i https://pypi.douban.com/simple
    hareandlion
    hareandlion
    Dec 28, 2016 via iPhone
    13
    豆瓣源一直满稳定
    raptor
    raptor
    Dec 28, 2016
    14
    一直用豆瓣
    sunus
    sunus
    Dec 28, 2016
    15
    阿里的源也不错
    alphadog619
    alphadog619
    OP
    Dec 30, 2016
    16
    @pheyer 呃,竟然没仔细看你发的链接
    pheyer
    pheyer
    Dec 30, 2016
    17
    @alphadog619 用我发的解决了?
    logeable
    logeable
    Dec 31, 2016
    18
    windows 下
    用户目录\pip\pip.ini

    [global]
    index-url = http://mirrors.aliyun.com/pypi/simple/
    [install]
    trusted-host=mirrors.aliyun.com
    yanzixuan
    yanzixuan
    Jan 4, 2017
    19
    polipo 转发 shadowsocks. 好用。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1117 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 138ms · UTC 23:07 · PVG 07:07 · LAX 15:07 · JFK 18:07
    ♥ Do have faith in what you're doing.