小编Jam*_*ter的帖子

“ pip配置了需要TLS / SSL的位置,但是Python中的ssl模块不可用”

我有anaconda软件包并运行Spyder。这是我的系统信息:

anaconda                  2018.12                  py37_0

Python                    3.7.1

pip                       18.1

Dell Inspiron 13 7000 64-bit
Run Code Online (Sandbox Code Playgroud)

我无法从命令提示符下使用pip安装任何内容。例如,在尝试安装numpy时(通过anaconda已经拥有),我得到以下信息:

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

Requirement already satisfied: numpy in c:\users\uday rallabhandi\anaconda3\lib\site-packages (1.15.4)

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

Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError("Can't …
Run Code Online (Sandbox Code Playgroud)

python openssl pip download anaconda

15
推荐指数
6
解决办法
3万
查看次数

如何通过异常处理停止无限循环的执行?

假设我在 Python 中运行了这段代码:

 while True:
     try:
         anything that doesn't break loop
     except: pass
Run Code Online (Sandbox Code Playgroud)

我怎样才能让它停止呢?(注意:我怀疑这不是我应该通过测试来学习的时候)。

当然,实际上我会使用一个break声明。这是一个理论问题;即使传递了一个 KeyboardInterrupt,又如何打破这个循环呢?

python loops exception infinite-loop

2
推荐指数
1
解决办法
8538
查看次数

标签 统计

python ×2

anaconda ×1

download ×1

exception ×1

infinite-loop ×1

loops ×1

openssl ×1

pip ×1