pip install命令用于安装扩展库,由于安装扩展库需要从国外网站下载,速度较慢,可以使用-i选项设置临时使用国内的镜像网站。
命令格式:
pip install -i 镜像地址 包名
例如:
pip install -i http://pypi.douban.com/simple/ django
常用国内镜像地址:
清华大学:https://pypi.tuna.tsinghua.edu.cn/simple/
阿里云:https://mirrors.aliyun.com/pypi/simple/
豆瓣网:https://pypi.douban.com/simple/
中国科技大学:https://pypi.mirrors.ustc.edu.cn/simple/
使用pip install命令时,如果出现“WARNING: The repository located at pypi.douban.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 pypi.douban.com'.”安装错误问题:
解决办法:
(1)可以使用参数–trusted-host指定可信任的主机
pip install -i http://pypi.douban.com/simple django --trusted-host=pypi.douban.com
安装成功后,可以用pip list查看包列表验证一下。
(2)不用参数–trusted-host,把http换成https。
pip install -i https://pypi.douban.com/simple django
试一下,先删除已安装的django包
pip uninstall django
安装成功。
更新日志
- 华语流行S.H.E《12CD》2001~2010[APE+CUE][3.7GB]
- 北风之望饮品怎么调配?饮品调酒配方分享
- 原画壁纸及美图第254期,无水印可自取
- 原画壁纸及美图第255期,无水印可自取
- 群星.1991-宝丽金冬日浓情【宝丽金】【WAV+CUE】
- 胡杨林.2006-香水有毒【太格印象】【WAV+CUE】
- 陈晓东.2002-从未忘记2CD【环球】【WAV+CUE】
- 绝区零珂蕾妲阵容怎么搭配好 珂蕾妲队伍搭配攻略
- 绝区零暴击鸣徽有哪些 绝区零暴击鸣徽效果介绍
- 魔兽世界奥格瑞玛法师训练师在哪 奥格瑞玛法师训练师位置介绍
- 《艾尔登法环》dlc带电祷告位置介绍
- 《幻兽帕鲁》泰锋boss坐标位置介绍
- 《山河旅探》6月份更新内容介绍
- 群星.2012《高雄国际Hi-End音响大展纪念发烧金碟(最响宣言)》[WAV分轨].
- 黄宣2021-Beanstalk[否极泰来][WAV+CUE]