- 在安装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,还能在右边选择版本:
mg alt="在这里插入图片描述" src="//img.jbzj.com/file_images/article/202409/2024092215344425.png" />安装成功:
以上就是python pip更换清华源镜像的详细教程的详细内容,更多关于python pip更换清华源镜像的资料请关注代码网其它相关文章!
发表评论