zoukankan      html  css  js  c++  java
  • Python解释器镜像源修改

    Python解释器镜像源修改

    这篇文章将解除你使用python的pip install xxx受到的网速限制,如果只是下载较小的第三方库,可以尝试pip --default-timeout=100 install -U xxx

    一、Windows

    1. 找到python安装目录下的:Libsite-packagespipmodelsindex.py文件,将PYPI的值改为你所需要的镜像源即可,例如改为豆瓣镜像源:
    Copy#PyPI = Index('https://pypi.python.org/')  
    PyPI = Index('https://pypi.douban.com/')  
    

    二、Mac

    1. 在终端进入目录:cd ~
    2. mac用户家目录中新建文件夹:mkdir pip
    3. 然后在.pip 文件夹内新建一个文件 :vi pip.conf,并且写入阿里云镜像:
    Copy[global]
    index-url = http://mirrors.aliyun.com/pypi/simple/
    
    [install]
    trusted-host=mirrors.aliyun.com
    
    我把月亮戳到天上 天就是我的 我把脚踩入地里 地就是我的 我亲吻你 你就是我的
  • 相关阅读:
    leetcode之String to Integer (atoi)
    初次思考
    leetcode之Reverse Words in a String
    Leetcode之Database篇
    在项目中添加类
    创建项目
    配置Eclipse

    递归
    多态
  • 原文地址:https://www.cnblogs.com/zhulipeng-1998/p/12863852.html
Copyright © 2011-2022 走看看