文章详情

短信预约-IT技能 免费直播动态提醒

请输入下面的图形验证码

提交验证

短信预约提醒成功

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

2023-09-21 17:39

关注
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......

来源地址:https://blog.csdn.net/qq_49580107/article/details/126380616

阅读原文内容投诉

免责声明:

① 本站未注明“稿件来源”的信息均来自网络整理。其文字、图片和音视频稿件的所属权归原作者所有。本站收集整理出于非商业性的教育和科研之目的,并不意味着本站赞同其观点或证实其内容的真实性。仅作为临时的测试数据,供内部测试之用。本站并未授权任何人以任何方式主动获取本站任何信息。

② 本站未注明“稿件来源”的临时测试数据将在测试完成后最终做删除处理。有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341

软考中级精品资料免费领

  • 历年真题答案解析
  • 备考技巧名师总结
  • 高频考点精准押题
  • 2024年上半年信息系统项目管理师第二批次真题及答案解析(完整版)

    难度     813人已做
    查看
  • 【考后总结】2024年5月26日信息系统项目管理师第2批次考情分析

    难度     354人已做
    查看
  • 【考后总结】2024年5月25日信息系统项目管理师第1批次考情分析

    难度     318人已做
    查看
  • 2024年上半年软考高项第一、二批次真题考点汇总(完整版)

    难度     435人已做
    查看
  • 2024年上半年系统架构设计师考试综合知识真题

    难度     224人已做
    查看

相关文章

发现更多好内容

猜你喜欢

AI推送时光机
位置:首页-资讯-后端开发
咦!没有更多了?去看看其它编程学习网 内容吧
首页课程
资料下载
问答资讯