当前位置: 首页 > news >正文

中铁建设集团员工登录网seo批量建站

中铁建设集团员工登录网,seo批量建站,网站会员注册怎么做,使用jsp建设动态网站教程【pip】 的换源(临时换源和永久换源) 一、临时换源二、永久换源三、Linux换源四、Windows换源 一、临时换源 临时换源只需要在pip安装包时,加上一个-i参数后接源的url即可: 临时换源: 清华源 pip3 install markdown…

【pip】 的换源(临时换源和永久换源)

  • 一、临时换源
  • 二、永久换源
  • 三、Linux换源
  • 四、Windows换源

一、临时换源

临时换源只需要在pip安装包时,加上一个-i参数后接源的url即可:

临时换源:

清华源
pip3 install markdown -i https://pypi.tuna.tsinghua.edu.cn/simple阿里源
pip3 install markdown -i https://mirrors.aliyun.com/pypi/simple/腾讯源
pip3 install markdown -i http://mirrors.cloud.tencent.com/pypi/simple豆瓣源
pip3 install markdown -i http://pypi.douban.com/simple/

二、永久换源

清华源
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple阿里源
pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/腾讯源
pip config set global.index-url http://mirrors.cloud.tencent.com/pypi/simple豆瓣源
pip config set global.index-url http://pypi.douban.com/simple/换回默认源
pip config unset global.index-url

pip换源的方式
在使用Python安装包工具pip时经常会出现下载很慢的情况,这其中有很大一部分原因和pip的源有关,在我们安装python后,通常python解释器自带pip这个工具,但是这里pip是设置的默认源,也就是官方源:

https://pypi.org/simple,这个源在国内的下载速度是很慢的,所以我们为了提高包的下载速度我们可以通过换源来实现。

PYPI国内源路径
阿里云 
http://mirrors.aliyun.com/pypi/simple/豆瓣(douban) 
http://pypi.douban.com/simple/清华大学 
https://pypi.tuna.tsinghua.edu.cn/simple/中国科学技术大学 
http://pypi.mirrors.ustc.edu.cn/simple/

下载python中的包,这里使用的是清华源
pip3 install markdown -i https://pypi.tuna.tsinghua.edu.cn/simple

显然不是一个一劳永逸的方法,只有下少量包的时候有使用的场景,下面我要介绍永久换源的方法,通过这个方式换源,那么以后我们下载的包就可以全部从这个url中下载了,这样大大减轻了我们的工作量,明显比临时换源的方法更好。

三、Linux换源

永久换源(更换默认源)
Linux
根目录下创建/修改 ~/.pip/pip.confpip 配置文件;

进入文件新增/修改内容;

[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple/
[install]
trusted-host = https://pypi.tuna.tsinghua.edu.cn
保存文件并退出;

四、Windows换源

Windows在 %HOMEPATH%\pip\pip.ini 中修改上面第二步的内容;(例如:C:\Users\Administrator\AppData\Roaming\pip\pip.ini)
保存文件退出;
常见问题
安装包的时候出现

Collecting beautifulsoup4
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 it is recommended to use HTTPS instead, otherwise you may silence this warning and allow it anyways with ‘–trusted-host mirrors.aliyun.com’.
Could not find a version that satisfies the requirement beautifulsoup4 (from versions: )
No matching distribution found for beautifulsoup4

这是一个问题是在pip镜像升级报警,只需要添加信任源即可:

临时换源处理

pip install beautifulsoup4 --trusted-host mirrors.aliyun.com

更换默认源配置(一劳永逸)

[install]
trusted-host=pypi.douban.com
http://www.hyszgw.com/news/13433.html

相关文章:

  • 网站运营如何做百度点击软件还有用吗
  • wordpress标签标题济南seo小黑seo
  • 托管网站北京网站建设
  • 广东宇晟建设工程有限公司网站淘宝指数在线查询
  • 北京海淀区信息科技有限公司seo综合查询怎么用
  • 做外单阿里的网站nba最新排行榜
  • 如何自己开发一个自己的网站线上销售方案
  • 360怎么做网站排名seo快速排名关键词
  • 变化型网站星巴克seo网络推广
  • wordpress xiu5.3个人博客seo
  • 区政府网站建设汇报北京搜索引擎优化主管
  • 博客编辑器 wordpress单页应用seo如何解决
  • 中央回应恶意不买房seo培训价格
  • 汉口网站关键词排名广告推广平台代理
  • 沈阳网站订制广州百度
  • 制作网站网页设计百度指数电脑端查询
  • 江西医院网站建设在百度平台如何做营销
  • wordpress整合ckplayseo资源是什么意思
  • 保定做网站建设福州今日头条新闻
  • 做网站站长累吗沈阳百度seo
  • 京东商城网站域名阻断艾滋病的药有哪些
  • 竞价网站做seo网站源码建站
  • 关于做情侣的网站的图片大全百度小说搜索风云榜总榜
  • 专业做网站推广的公司bt磁力搜索引擎在线
  • 天津市做公司网站的公司湖南长沙最新疫情
  • 斐讯k3做网站爱站网
  • 商务网站建设实训总结网站建设方案内容
  • 赌球网站推广怎么做自媒体平台有哪些
  • 网站建设制作pdf零基础seo入门教学
  • 专业网站在线bt磁力搜索