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

huangapple go评论73阅读模式
英文:

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

问题

当我尝试在Python虚拟环境中安装任何包时,我收到了以下消息:

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

我在stackoverflow上检查了一些解决方案,但似乎没有一个能解决我的问题,因为大多数stackoverflow上的解决方案都建议添加Anaconda Python安装路径,但我并没有使用Anaconda、Conda或Miniconda。

我使用的是Windows 10,并且已经将环境变量路径设置为我的Python安装路径:

C:\Python38
C:\Python38\Scripts
C:\OSGeo4W64\apps\Python37
C:\OSGeo4W64\apps\Python37\Scripts

在stackoverflow上的一个问题中,我偶然看到了一个评论,有人使用QGIS,并且添加了QGIS Python安装路径也无法解决这个警告。

如何在Python虚拟环境中安装pip包?

英文:

When I try to install any package in a virtual environment in Python I got a message:

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

I've checked a few solutions on stackoverflow but none of them seems to solve my problem, because most of the solutions on stack tell to add path to Anaconda Python installation, but I don't use Anaconda or Conda or Miniconda).

I use Windows 10 and I have set environmental paths to my Python installations:

C:\Python38
C:\Python38\Scripts
C:\OSGeo4W64\apps\Python37
C:\OSGeo4W64\apps\Python37\Scripts

In only one question on stack I've stumbled upon a comment that someone uses QGIS and adding paths to the QGIS Python installation didn't help anyway to solve this warning.

How to make installing pip packages work in a Python virtual environment?

答案1

得分: 1

由于我没有收到任何回复,我决定卸载 Python 并安装一个更新的版本。

我从 Windows 控制面板中点击了“卸载 Python”,但随后出现了一个错误,提示“未检测到 Python 3.8 安装”,尽管我已经在我的计算机上安装了 Python 3.8。还有一个 0x80070643 错误。于是我点击了“更改” -> “修复” 然后...它奏效了。修复重新添加了 Python 的路径到我的环境变量中。现在我可以在虚拟环境中安装包了。

感谢给我的问题投-1票的人。祝所有使用 Anaconda Python 的人好运,因为有很多关于如何解决这个问题的答案适用于 Anaconda 用户。

结果证明,解决我的问题的方法很简单 - 你尝试过卸载并重新安装 Python 吗?

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

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

英文:

Since I didn't get any replies I've decided to uninstall Python and get a newer one.

I've clicked Uninstall Python from the Windows Control Panel, but then I got an error that "No Python 3.8 installation was detected" despite I have Python 3.8 on my machine. And another 0x80070643 error. So I've clicked Change -> Repair and... it worked. Reparation has added Pythons paths again to my env. Now I am able to install packages in a virtual environment.

Thanks to the one who give -1 vote for my question. Good luck for everyone who uses Anaconda Python, because there are plenty of answers how to solve this problem for Anaconda users.

It turned out that solution to my problem was simple - Have you tried to uninstall and install Python again?

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

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

huangapple
  • 本文由 发表于 2023年2月10日 02:48:05
  • 转载请务必保留本文链接:https://go.coder-hub.com/75403138.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定