pycharm 安装库

这是另一种方式。

搜索到的安装库的方式多数是:在桌面上win+R键运行终端,输入命令,安装不了,发现安装不了。

1、打开pycharm;

2、软件下部的Terminal终端(需要运行一个代码才能出现,任何代码都可);

3、有时候使用默认的官方网址下载安装包网速较慢,或者出现connection timeou报错。这时我们可以使用-i参数修改成从国内镜像下载安装。国内几个pip源网址如下:

清华:https://pypi.tuna.tsinghua.edu.cn/simple

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

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

华中理工大学:http://pypi.hustunique.com/

山东理工大学:http://pypi.sdutlinux.org/

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

4、安装命令:pip install 模块名 -i 国内源

其他安装命令:pip3 install 模块名(or + -i 国内源)

5、pip升级到7.0以后,在使用http镜像进行包安装及升级的时候往往会有如下提示:

Collecting beautifulsoup4

The repository located at xxx.com is not a trusted or secure host and is being ignored. If this repository is available via HTTPS it is recommended to use HTTPS instead, otherwise you may silence this warning and allow it anyways with '--trusted-host xxx.com'.

这时候根据提示在最后添加--trusted-host + 镜像官网即可。

例如:

pip install 模块名 -i http://pypi.douban.com/simple --trusted-host pypi.douban.com

相关推荐
好开心啊没烦恼1 小时前
Python 数据分析:计算,分组统计1,df.groupby()。听故事学知识点怎么这么容易?
开发语言·python·数据挖掘·数据分析·pandas
lljss20202 小时前
Python11中创建虚拟环境、安装 TensorFlow
开发语言·python·tensorflow
空中湖2 小时前
tensorflow武林志第二卷第九章:玄功九转
人工智能·python·tensorflow
CodeCraft Studio3 小时前
CAD文件处理控件Aspose.CAD教程:使用 Python 将绘图转换为 Photoshop
python·photoshop·cad·aspose·aspose.cad
Python×CATIA工业智造5 小时前
Frida RPC高级应用:动态模拟执行Android so文件实战指南
开发语言·python·pycharm
onceco6 小时前
领域LLM九讲——第5讲 为什么选择OpenManus而不是QwenAgent(附LLM免费api邀请码)
人工智能·python·深度学习·语言模型·自然语言处理·自动化
狐凄6 小时前
Python实例题:基于 Python 的简单聊天机器人
开发语言·python
悦悦子a啊7 小时前
Python之--基本知识
开发语言·前端·python
回家吃月饼8 小时前
pycharm2018配置gitee操作
pycharm·gitee
hero_heart8 小时前
vscode中c_cpp_properities.cpp文件生成和作用
ide·vscode·编辑器