Python安装第三方库出错

Python 程序包镜像的国内源如下:

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

使用方法:pip install -i 镜像源 包名

比如我要安装requests库,则可以在Terminal控制台执行下面命令


pip  install --index https://pypi.mirrors.ustc.edu.cn/simple requests

我们也可以直接修改默认的镜像源,比如将系统默认镜像源设置为清华源,在控制台输入下面命令

pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple

相关推荐

  1. Python安装出错

    2023-12-11 13:42:02       38 阅读
  2. python

    2023-12-11 13:42:02       14 阅读
  3. Python--OpenCV】随笔

    2023-12-11 13:42:02       43 阅读
  4. Python-】cv2

    2023-12-11 13:42:02       14 阅读
  5. python安装

    2023-12-11 13:42:02       13 阅读

最近更新

  1. TCP协议是安全的吗?

    2023-12-11 13:42:02       18 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2023-12-11 13:42:02       19 阅读
  3. 【Python教程】压缩PDF文件大小

    2023-12-11 13:42:02       18 阅读
  4. 通过文章id递归查询所有评论(xml)

    2023-12-11 13:42:02       20 阅读

热门阅读

  1. ARM day3

    ARM day3

    2023-12-11 13:42:02      36 阅读
  2. MyEclipse中常用的快捷键大全

    2023-12-11 13:42:02       32 阅读
  3. 字符串数组与字符串指针

    2023-12-11 13:42:02       42 阅读
  4. 12.10每日一题(备战蓝桥杯循环输出)

    2023-12-11 13:42:02       29 阅读
  5. 30.如何在Spring所有Bean创建完后做扩展?

    2023-12-11 13:42:02       34 阅读
  6. LeetCode-4. 寻找两个正序数组的中位数

    2023-12-11 13:42:02       33 阅读