python - 错误 SSL 与 python (https)

标签 python ssl https debian python-telegram-bot

我在 debian 8 下

我尝试安装:python-telegram-bot (https://github.com/python-telegram-bot/python-telegram-bot) 但是当我执行“python setup.py install”时出现错误:

Installed /usr/local/lib/python2.7/site-packages/python_telegram_bot-5.3.1-py2.7.egg
Processing dependencies for python-telegram-bot==5.3.1 Searching for certifi 
Reading https://pypi.python.org/simple/certifi/
Download error on https://pypi.python.org/simple/certifi/: unknown url type: https -- Some packages may not be found!

所以我尝试用 open-ssl 重新安装 python 2.7.13:

apt-get install opensll
apt-get install libssl-dev

我编辑了/Modules/setup.dist :

# Socket module helper for socket(2)
_socket socketmodule.c timemodule.c

# Socket module helper for SSL support; you must comment out the other
# socket line above, and possibly edit the SSL variable: SSL=/usr/local/ssl
_ssl _ssl.c \
        -DUSE_SSL -I$(SSL)/include -I$(SSL)/include/openssl \
        -L$(SSL)/lib -lssl -lcrypto

之后,我运行了 ./configure 和 make && make install

我有错误:在安装过程中:

Makefile:1081: recipe for target 'libinstall' failed make: *** [libinstall] 
Error 1

而且 python-telegram-bot 不会编译...

有人可以有想法吗?

非常感谢。 问候

最佳答案

我建议在安装 OpenSSL 后尝试重新安装 python2.7,正如以下 stackoverflow 答案中所建议的那样:

https://stackoverflow.com/a/19926770/3826254

或者简单地使用 pip而是安装 python 包。

关于python - 错误 SSL 与 python (https),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43643316/

相关文章:

ruby-on-rails - bundle 安装失败,出现 SSL 证书验证错误

kubernetes - Istio:如何重定向到 HTTPS,除了/.well-known/acme-challenge

python - 如何将通过 tkinter 循环创建的单选按钮值设置为默认值?

Python,数据帧: Duplicating rows according to the number of items in a list and ranking the resulted rows

ssl - 错误 : AWS CLI SSH Certificate Verify Failed _ssl. c:581

android - 旧 Android 手机的 AWS SSL 证书

symfony - security.yml requires_channel 似乎被忽略了

java - 默认的 java cacerts 不起作用

带有全局常量变量的Python遗传优化多处理,如何加速?

python - imaplib/gmail 如何在不标记已读的情况下下载完整邮件(所有部分)