zoukankan      html  css  js  c++  java
  • PySe-013-指定安装源安装模块 + 修改安装源

    使用 pip 安装模块的时候,pip 默认使用 Python 官方的镜像源,由于网络受限原因,经常会导致安装不可用。可通过使用国内的 Python 镜像源安装。常见的国内镜像源有如下几个,我比较习惯使用阿里的镜像源。

    http://mirrors.aliyun.com/pypi/simple/ 阿里
    http://pypi.douban.com/simple/ 豆瓣
    http://pypi.hustunique.com/simple/ 华中理工大学
    http://pypi.sdutlinux.org/simple/ 山东理工大学
    http://pypi.mirrors.ustc.edu.cn/simple/ 中国科学技术大学

    临时指定安装源:
    pip install -i http://mirrors.aliyun.com/pypi/simple/ Django
    pip install -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com Djang

    Linux 更新 Python 镜像源配置文件路径:~/.pip/pip.conf
    Windows 更新 Python 镜像源配置文件路径: C:Users电脑用户AppDataRoamingpippip.ini

    在文件中添加如下所示的信息:
    [global]
    index-url = http://mirrors.aliyun.com/pypi/simple/

    [install]
    use-mirrors = true
    mirrors = http://mirrors.aliyun.com/pypi/simple/
    trusted-host = mirrors.aliyun.com

  • 相关阅读:
    Vue's Demo
    安装informatic过程中的错误
    linux系统字符集
    netstat
    查看linux系统的信息
    以太坊私有链的搭建
    $0 $1
    WordPaster-Joomla_3.4.7-tinymce 4.1.7示例发布
    Joomla3x-CKEditor4x-WordPaster整合示例
    Firefox 43无法安装xpi的问题
  • 原文地址:https://www.cnblogs.com/fengpingfan/p/13895432.html
Copyright © 2011-2022 走看看