使用pyqt5和cryptography modu运行打包的python程序时出错

2024-04-20 06:22:58 发布

您现在位置:Python中文网/ 问答频道 /正文

因此,我编写了一个小程序来加密一些文本,使用加密模块和PyQt5进行一些GUI操作。我用pyinstaller和cx\u freeze打包了它,在尝试启动应用程序时会出现不同的错误。当我用python启动独立程序时,它就工作了。你知道吗

安装程序:

jfk422@jfk422-MLinux ~/Desktop/Axon/build/index $ ./index Error loading Python lib '/home/jfk422/Desktop/Axon/build/index/libpython3.6m.so.1.0': /home/jfk422/Desktop/Axon/build/index/libpython3.6m.so.1.0: cannot open shared object file: No such file or directory

cx\U冻结:

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'

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

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


Tags: inpybuildindexlibusrlocalline