使用pyqt5和cryptograpy模块运行打包的python程序时出错

时间:2017-08-18 13:06:03

标签: python python-3.x pyqt packaging

所以我写了一个小程序来加密一些文本,使用加密模块和PyQt5来解决它周围的一些GUI问题。我用pyinstaller和cx_freeze打包它,在尝试启动应用程序时导致不同的错误。当我用python启动它时,独立程序可以工作。

pyinstaller:

jfk422@jfk422-MLinux ~/Desktop/Axon/build/exe.linux-x86_64-3.6 $ ./index
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/cx_Freeze/initscripts/__startup__.py", line 14, in run
    module.run()
  File "/usr/local/lib/python3.6/site-packages/cx_Freeze/initscripts/Console.py", line 26, in run
    exec(code, m.__dict__)
  File "index.py", line 1, in <module>
  File "/home/jfk422/Desktop/Axon/create.py", line 2, in <module>
    from cryptography.fernet import Fernet
  File "/usr/local/lib/python3.6/site-packages/cryptography/fernet.py", line 17, in <module>
    from cryptography.hazmat.primitives import hashes, padding
  File "/usr/local/lib/python3.6/site-packages/cryptography/hazmat/primitives/padding.py", line 13, in <module>
    from cryptography.hazmat.bindings._padding import lib
ModuleNotFoundError: No module named '_cffi_backend'

cx_freeze:

    jQuery.ajax({
        url: '/test',
        beforeSend(xhr){

        },
        success: function (data, textStatus){
            $('#test2').html(data);
        },
        async: true
    });

源代码: https://github.com/JFK422/Axon

其他信息: python 3.6.1 发行版:LinuxMint 版本:18.1 内核:4.4.0-92-generic

0 个答案:

没有答案