部署到 iOS 时 kivy-ios 导入 ssl 错误

Posted

技术标签:

【中文标题】部署到 iOS 时 kivy-ios 导入 ssl 错误【英文标题】:kivy-ios import ssl error when deploying to iOS 【发布时间】:2013-08-01 08:50:11 【问题描述】:

我正在尝试在我的 kivy 应用程序中导入 ssl,但当我部署到 ios 时它崩溃了。

它崩溃了:

import ssl

这是来自设备的日志:

2013-07-31 20:13:06.215 mykivyapp[2568:907] [Springtomize]: Loading into sb-external process
2013-07-31 20:13:07.308 mykivyapp[2568:907] PythonHome is: /var/mobile/Applications/3742734C-18CB-49A5-B943-BABADBA9D26E/mykivyapp.app
2013-07-31 20:13:07.311 mykivyapp[2568:907] Initializing python
2013-07-31 20:13:07.719 mykivyapp[2568:907] Running main.pyo: /var/mobile/Applications/3742734C-18CB-49A5-B943-BABADBA9D26E/mykivyapp.app/YourApp/main.pyo
[INFO              ] Kivy v1.7.1
[INFO              ] [Factory     ] 144 symbols loaded
[DEBUG             ] [Cache       ] register <kv.lang> with limit=None, timeout=Nones
[DEBUG             ] [Cache       ] register <kv.image> with limit=None, timeout=60s
[DEBUG             ] [Cache       ] register <kv.atlas> with limit=None, timeout=Nones
[DEBUG             ] [Image       ] option <dds> ignored by config
[DEBUG             ] [Image       ] option <pygame> ignored by config
[DEBUG             ] [Image       ] option <pil> ignored by config
[DEBUG             ] [Image       ] option <gif> ignored by config
[INFO              ] [Image       ] Providers: img_imageio, img_tex (img_dds, img_pygame, img_pil, img_gif ignored)
[DEBUG             ] [Cache       ] register <kv.texture> with limit=1000, timeout=60s
[DEBUG             ] [Cache       ] register <kv.shader> with limit=1000, timeout=3600s
[DEBUG             ] [Text        ] Ignored <pygame> (import error)
[INFO              ] [Text        ] Provider: sdlttf(['text_pygame'] ignored)
 Traceback (most recent call last):
   File "/Users/0/Desktop/kivy-ios/app-mykivyapp/YourApp/main.py", line 30, in <module>
   File "/Users/0/Desktop/kivy-ios/build/python/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
2013-07-31 20:13:08.967 mykivyapp[2568:907] Application quit abnormally!
2013-07-31 20:13:09.016 mykivyapp[2568:907] Leaving

【问题讨论】:

【参考方案1】:

正如 Mathieu Virbel here 解释的那样,您需要找到一种方法来在您的项目中导入您的 ssl 模块。

【讨论】:

以上是关于部署到 iOS 时 kivy-ios 导入 ssl 错误的主要内容,如果未能解决你的问题,请参考以下文章

使用 OpenSsl 支持构建 Kivy-ios

Kivy-ios Xcode 构建错误

为 Kivy-ios 编译自定义模块

kivy-ios .toolchain.py:第 4 行:语法错误:Mac High Sierra 中文件意外结束

麻烦交叉编译 Python 2 Xcode:kivy-ios 分发抛出错误

OpenSSL解决ArcGIS软件部署的证书问题(三)--ArcGIS绑定证书