我有一个使用 pyOpenSSL 进行证书检查的 PySide 程序,我用 Cx_Freeze 编译它,每当我在编译后尝试打开它时,都会出现以下错误:
我正在使用 pyOpenSSL 0.14、Cx_Freeze 4.3.3 和 PySide 1.2.2。
为什么我得到异常?
Reposting from the mailing list: Adding cryptography
to packages in the setup.py file fixed this issue. The cryptography package loads some submodules using __import__()
, which prevents cx_Freeze from automatically finding what modules are needed. Putting it in packages
makes cx_Freeze copy all submodules.