python第三方库安装-python的第三方库安装

什么是第三方库

别人写好的一些功能代码,我们可以拿过来直接用

第三方库安装方法

1、pip在线安装(100%推荐)

默认源:pip install 包名

国内源:pip install 包名 -i http://mirrors.aliyun.com/pypi/simple/

注意:报黄色警告不要管

备注:常用的国内源地址

(1)阿里云 http://mirrors.aliyun.com/pypi/simple/

(2)豆瓣http://pypi.douban.com/simple/

(3)清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/

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

(5)华中科技大学http://pypi.hustunique.com/

问题:

The repository located at mirrors.aliyun.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 mirrors.aliyun.com'. Could not find a version that satisfies the requirement proxy (from versions: ) No matching distribution found for proxy

答案:

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

改成

https://mirrors.aliyun.com/pypi/simple/

注意:pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='f 的解决办法

pip --default-timeout=1000 install -U 模块名

2、pycharm中安装

1846968-20191224212702052-10295976.png

1846968-20191224212854126-115611400.png

3、离线安装(了解即可)

1)下载地址:https://pypi.org/(百度pypi就有)

2)下载XX.tar.gz 压缩包

1846968-20191224213256076-1808380301.png

3)对下载的安装包解压

4)把解压后的文件copy到python的安装路径中

5)cmd进入到下载的文件夹中,会看到setup.py文件

6)执行命令:python setup.py install

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值