Python pip更换清华源镜像

Python pip更换清华源镜像

  • 在安装Python库时使用清华源镜像是为了改善库的下载速度和稳定性
  • 地址:https://pypi.tuna.tsinghua.edu.cn/simple

命令安装

  • 安装命令:

    pip install 包名 -i https://pypi.tuna.tsinghua.edu.cn/simple
    
  • 以wordcloud库为例,在终端输入后回车:

    pip install wordcloud -i https://pypi.tuna.tsinghua.edu.cn/simple
    

    在这里插入图片描述
    在这里插入图片描述

配置安装

  • 依次点击PyCharm的File,Settings:
    在这里插入图片描述
  • 再依次点击Project,Python Interpreter,+:
    在这里插入图片描述
  • 点击Manage Repositories:
    在这里插入图片描述
  • 点击+,输入清华源镜像地址:https://pypi.tuna.tsinghua.edu.cn/simple,点击OK:
    在这里插入图片描述
  • 再点击OK:
    在这里插入图片描述
  • 以wordcloud为例,输入想要安装的库名,点击Install Package,还能在右边选择版本:
    在这里插入图片描述
  • 安装成功:
    在这里插入图片描述

其它镜像

  • 豆瓣:http://pypi.douban.com/simple/

  • 阿里云:http://mirrors.aliyun.com/pypi/simple/

  • 中国科学技术大学:http://pypi.mirrors.ustc.edu.cn/simple/

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
THE END
分享
二维码
< <上一篇
下一篇>>