当前位置:首页 » 《随便一记》 » 正文

解决 pip is configured with locations that require TLS/SSL, however the ssl module in Python is not

20 人参与  2022年11月08日 10:17  分类 : 《随便一记》  评论

点击全文阅读


PS C:\Users\ > pip install pipDefaulting to user installation because normal site-packages is not writeableWARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.

#win10:Windows powershell

#2022/8/17

#users:fanch

这次准备用pip安装一下you-get这个包,出现上面报错:

报错内容一:
Defaulting to user installation because normal site-packages is not writeable

这里提示我们包无法正常读入,没有书写权限

报错内容二:

WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.

这里提示我们缺少openssl模块

下面我们分别来解决这两个问题:

part1:

 首先进入  ‪E:\anaconda\Lib\site-packages 这个指定位置,修改用户的读写权限

-----------------------------(在这之前,还应当把这几条路径加入环境变量)----------------------------------

已添加则忽略该部分

 右击此电脑>高级系统设置>高级>环境变量>添加环境变量

 

———————————————————————————————————————————

修改了文件夹的读写权限之后,报错内容为 

part2:WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.

PS C:\Users\fanch> pip install you-getWARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/you-get/WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/you-get/WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/you-get/WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/you-get/WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/you-get/Could not fetch URL https://pypi.org/simple/you-get/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/you-get/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skippingERROR: Could not find a version that satisfies the requirement you-get (from versions: none)ERROR: No matching distribution found for you-get

即缺少了SSL模块,进入 Win32/Win64 OpenSSL Installer for Windows - Shining Light Productionsicon-default.png?t=M666https://slproweb.com/products/Win32OpenSSL.html

选择 Win64 OpenSSL v1.1.1q Light 的 MSI进行下载点击安装即可

 这之后  you-get命令还是不能使用,一方面你需要返回第一步,改写相关的几个文件夹Lib和script的读写权限,另一方面需要删除 e:\anaconda\lib\site-packages下原有的安装文件

PS C:\Users\> pip install you-getRequirement already satisfied: you-get in e:\anaconda\lib\site-packages (0.4.1620)PS C:\Users\> you-getyou-get : The term 'you-get' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.At line:1 char:1+ you-get+ ~~~~~~~    + CategoryInfo          : ObjectNotFound: (you-get:String) [], CommandNotFoundException    + FullyQualifiedErrorId : CommandNotFoundException

 

然后重新运行pip install you-get 命令就可以正常使用了

PS C:\Users\> pip install you-getCollecting you-get  Using cached you_get-0.4.1620-py3-none-any.whl (230 kB)Installing collected packages: you-getSuccessfully installed you-get-0.4.1620PS C:\Users\> you-get.exeusage: you-get [OPTION]... URL...A tiny downloader that scrapes the weboptional arguments:  -V, --version         Print version and exit  -h, --help            Print this help message and exit......


点击全文阅读


本文链接:http://m.zhangshiyu.com/post/47396.html

<< 上一篇 下一篇 >>

  • 评论(0)
  • 赞助本站

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

最新文章

  • 邻居低素质,而我没素质独家番外_老太太赖皮欣欣超长版_小说后续在线阅读_无删减免费完结_
  • 重生后我转嫁首富瘸腿独子,总裁前夫却疯了一口气看完_妹妹傅云琛沈明辉独家番外_小说后续在线阅读_无删减免费完结_
  • 我拒绝给系花捐款后,全系同学悔疯了在线阅读_小说后续在线阅读_无删减免费完结_
  • 我让位给女友的透视眼竹马,他却说如果能重生再也不来了。虐心反转_玉石林若女友推荐_小说后续在线阅读_无删减免费完结_
  • 相国独子的丫鬟砸坏我的玉佩后,我当场拒婚阅读_玉佩陈郡谢氏全新_小说后续在线阅读_无删减免费完结_
  • 手术时,我看着病人惨死最新试读_淼淼陆知衍姜颜全本完结_小说后续在线阅读_无删减免费完结_
  • 男友霸道给我开黑卡,转头却骂我是捞女最新章节_肖年顾客黑卡热文_小说后续在线阅读_无删减免费完结_
  • 他在回忆尽头全集_贺南舟许清梨叶絮完结txt_小说后续在线阅读_无删减免费完结_
  • 旅游结婚那天未婚夫另娶女秘书,我让他们一无所有连载_老公迎宾超长版_小说后续在线阅读_无删减免费完结_
  • 完结文异界修仙我的直播间能打赏核弹列表_完结文异界修仙我的直播间能打赏核弹(江流年沈红菱)
  • 全书浏览陪弟弟混骑行圈,离婚你哭什么?(韩星河柳千雪)_陪弟弟混骑行圈,离婚你哭什么?(韩星河柳千雪)全书结局
  • 老公出轨我助攻虐心反转_秦绍卿卿阿溪后续加长_小说后续在线阅读_无删减免费完结_

    关于我们 | 我要投稿 | 免责申明

    Copyright © 2020-2022 ZhangShiYu.com Rights Reserved.豫ICP备2022013469号-1