我如何调用AWS使用Python 3和httplib2会在Windows 7? [英] How do I make calls to AWS with Python 3 and httplib2 on Windows 7?

查看:428
本文介绍了我如何调用AWS使用Python 3和httplib2会在Windows 7?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用httplib2会打电话到亚马逊网络服务(AWS):

I am using httplib2 to make calls to Amazon Web Services (AWS):

http = httplib2.Http(cache='.cache')
response, content = http.request('https://sdb.amazonaws.com/...')

但它失败寻找的CA(我认为):

However it fails looking for CAs (I think):

File "C:\Python32\lib\site-packages\httplib2\__init__.py", line 1059, in request self.disable_ssl_certificate_validation)
File "C:\Python32\lib\site-packages\httplib2\__init__.py", line 772, in __init__ context.load_verify_locations(ca_certs)
IOError: [Errno 2] No such file or directory

我的问题:

  1. 有什么我需要做什么来配置我的操作系统和环境,这个工作?
  2. 我已经看到了很多关于确保套接字库是专为SSL在Python 2职位;这是否适用于Python的3​​?

谢谢!

推荐答案

httplib2的/ Python3文件夹丢失cacerts.txt,因此它不会被复制到了Python / lib文件夹。我手动复制文件有和一切工作。这是httplib2的一个已知的问题。

The httplib2 /Python3 folder is missing cacerts.txt, so it doesn't get copied to the Python /lib folder. I copied the file there manually and everything worked. This is a known issue with httplib2.

这篇关于我如何调用AWS使用Python 3和httplib2会在Windows 7?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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