我有一个 App Engine 应用程序,我正在使用 Dropbox SDK,但我在 import ssl 行中遇到错误。
回溯
File "/base/data/home/apps/s~email-dropbox/1.363170643114750340/dropbox/rest.py", line 11, in <module>
import ssl
File "/base/python27_runtime/python27_dist/lib/python2.7/ssl.py", line 60, in <module>
import _ssl # if we can't import it, let the error propagate
ImportError: No module named _ssl
我知道 ssl.py 是 SSL C 库的包装器,而 appEngine 只处理纯 python。但是没有办法解决这个问题吗?或者任何人都可以将我链接到适用于 App Engine 的 Dropbox SDK 吗?
最佳答案
回答晚了,但这是导入 SSL 库的方法
在你的app.yaml
中,添加这个
libraries:
- name: ssl
version: latest
这对我有用。
关于python - App Engine 导入 ssl 失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13384792/