python的第三方库安装教程详解

   日期:2020-08-09     浏览:143    评论:0    
核心提示:什么是第三方库别人写好的一些功能代码,我们可以拿过来直接用第三方库安装方法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)清华大学 http

什么是第三方库

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

第三方库安装方法

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/
注意:pip源提示“not a trusted or secure host” 解决

问题:
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中安装

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

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

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

3)对下载的安装包解压

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

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

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

 
打赏
 本文转载自:网络 
所有权利归属于原作者,如文章来源标示错误或侵犯了您的权利请联系微信13520258486
更多>最近资讯中心
更多>最新资讯中心
0相关评论

推荐图文
推荐资讯中心
点击排行
最新信息
新手指南
采购商服务
供应商服务
交易安全
关注我们
手机网站:
新浪微博:
微信关注:

13520258486

周一至周五 9:00-18:00
(其他时间联系在线客服)

24小时在线客服