• 企业400电话
  • 微网小程序
  • AI电话机器人
  • 电商代运营
  • 全 部 栏 目

    企业400电话 网络优化推广 AI电话机器人 呼叫中心 网站建设 商标✡知产 微网小程序 电商运营 彩铃•短信 增值拓展业务
    pip install命令安装扩展库整理

    pip install命令用于安装扩展库,由于安装扩展库需要从国外网站下载,速度较慢,可以使用-i选项设置临时使用国内的镜像网站。

    命令格式:

    pip install -i 镜像地址 包名
    例如:
    pip install -i http://pypi.douban.com/simple/ django

    常用国内镜像地址:

    清华大学:https://pypi.tuna.tsinghua.edu.cn/simple/
    阿里云:https://mirrors.aliyun.com/pypi/simple/
    豆瓣网:https://pypi.douban.com/simple/
    中国科技大学:https://pypi.mirrors.ustc.edu.cn/simple/

    使用pip install命令时,如果出现“WARNING: The repository located at pypi.douban.com is not a trusted or secure host and is being ignored. If this repository is available via HTTPS we recommend you use HTTPS instead, otherwise you may silence this warning and allow it anyway with ‘–trusted-host pypi.douban.com'.”安装错误问题:


    解决办法:

    (1)可以使用参数–trusted-host指定可信任的主机
    pip install -i http://pypi.douban.com/simple django --trusted-host=pypi.douban.com


    安装成功后,可以用pip list查看包列表验证一下。


    (2)不用参数–trusted-host,把http换成https。
    pip install -i https://pypi.douban.com/simple django

    试一下,先删除已安装的django包
    pip uninstall django



    安装成功。

    到此这篇关于pip install命令安装扩展库整理的文章就介绍到这了,更多相关pip install命令内容请搜索脚本之家以前的文章或继续浏览下面的相关文章希望大家以后多多支持脚本之家!

    您可能感兴趣的文章:
    • 用pip给python安装matplotlib库的详细教程
    • pip 20.3 新版本发布!即将抛弃 Python 2.x(推荐)
    • python subprocess pipe 实时输出日志的操作
    • Python更改pip镜像源的方法示例
    • Python离线安装各种库及pip的方法
    上一篇:python实现杨辉三角的几种方法代码实例
    下一篇:python上下文管理的使用场景实例讲解
  • 相关文章
  • 

    © 2016-2020 巨人网络通讯 版权所有

    《增值电信业务经营许可证》 苏ICP备15040257号-8

    pip install命令安装扩展库整理 pip,install,命令,安装,扩展,