CentOS 5.2上的Python 2.6中缺少HTTPSConnection模块 [英] HTTPSConnection module missing in Python 2.6 on CentOS 5.2

查看:269
本文介绍了CentOS 5.2上的Python 2.6中缺少HTTPSConnection模块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在CentOS 5.2上使用Python应用程序。
它使用Boto模块与Amazon Web Services通信,这需要通过HTTPS连接进行通信。

I'm playing around with a Python application on CentOS 5.2. It uses the Boto module to communicate with Amazon Web Services, which requires communication through a HTTPS connection.

当我尝试运行我的应用程序时,缺少HTTPS连接:
AttributeError:'module'对象没有属性'HTTPSConnection'

When I try running my application I get an error regarding HTTPSConnection being missing: "AttributeError: 'module' object has no attribute 'HTTPSConnection'"

Google没有真正返回任何相关的内容,大多数解决方案,但没有一个解决问题。

Google doesn't really return anything relevant, I've tried most of the solutions but none of them solve the problem.

有没有人遇到类似的东西?

Has anyone come across anything like it?

这是traceback:

Here's the traceback:

Traceback (most recent call last):
File "./chatter.py", line 114, in <module>
    sys.exit(main())
File "./chatter.py", line 92, in main
    chatter.status( )
File "/mnt/application/chatter/__init__.py", line 161, in status
    cQueue.connect()
File "/mnt/application/chatter/tools.py", line 42, in connect
    self.connection = SQSConnection(cConfig.get("AWS", "KeyId"), cConfig.get("AWS", "AccessKey"));
File "/usr/local/lib/python2.6/site-packages/boto-1.7a-py2.6.egg/boto/sqs/connection.py", line 54, in __init__
    self.region.endpoint, debug, https_connection_factory)
File "/usr/local/lib/python2.6/site-packages/boto-1.7a-py2.6.egg/boto/connection.py", line 418, in __init__
    debug,  https_connection_factory)
File "/usr/local/lib/python2.6/site-packages/boto-1.7a-py2.6.egg/boto/connection.py", line 189, in __init__
    self.refresh_http_connection(self.server, self.is_secure)
File "/usr/local/lib/python2.6/site-packages/boto-1.7a-py2.6.egg/boto/connection.py", line 247, in refresh_http_connection
    connection = httplib.HTTPSConnection(host)
AttributeError: 'module' object has no attribute 'HTTPSConnection'


推荐答案

引用python文档( http://docs.python.org/library/httplib.html ):

citing from the python documentation (http://docs.python.org/library/httplib.html):

注意仅当套接字模块是使用SSL支持编译时才支持HTTPS。

Note HTTPS support is only available if the socket module was compiled with SSL support.

您应该了解CentOS上的python您正在使用已建立。

You should find out how python on the CentOS you are using was built.

这篇关于CentOS 5.2上的Python 2.6中缺少HTTPSConnection模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆