打招呼!
我正在尝试使用PyInstaller进行构建。配置:Python 3.6.5 pip 10.0.1,操作系统:Ubuntu 18.04。使用virtualenv(也曾尝试与一起使用python -m venv)。
我的应用程序使用apscheduler,websocket,_thread和它看起来像一些相关的模块有进口的问题。试过pyinstaller --onefile mymain.spec&pyinstaller --onedir mymain.spec。在两种情况下问题仍然存在。如果程序没有冻结,程序将正常运行。
这是我尝试运行生成的可执行文件时遇到的错误:
Traceback (most recent call last):
File "apscheduler/schedulers/base.py", line 882, in _create_plugin_instance
KeyError: 'interval'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "cmonitorcli/services/socket_client.py", line 70, in run
File "cmonitorcli/services/scheduler.py", line 36, in add_update_job
File "apscheduler/schedulers/base.py", line 413, in add_job
File "apscheduler/schedulers/base.py", line 907, in _create_trigger
File "apscheduler/schedulers/base.py", line 890, in _create_plugin_instance
LookupError: No trigger by the name "interval" was found
^CTraceback (most recent call last):
File "websocket/_app.py", line 283, in run_forever
File "websocket/_app.py", line 50, in read
KeyboardInterrupt
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "cmonitorcli/main.py", line 20, in <module>
File "cmonitorcli/main.py", line 8, in main_job
File "cmonitorcli/client.py", line 29, in __init__
File "cmonitorcli/services/socket_client.py", line 31, in connect
File "websocket/_app.py", line 283, in run_forever
KeyboardInterrupt
requirements.txt:
jsonpickle==0.9.6
pkg-resources==0.0.0
six==1.11.0
websocket-client==0.48.0
apscheduler==3.5.1
pyinstaller==3.3.1
我需要进行--onefile构建。
请注意hiddenimports与这些配合使用的示例:
missing module named 'wsaccel.xormask' - imported by websocket._abnf
missing module named numpy - imported by websocket._abnf
missing module named win32evtlog - imported by logging.handlers
和其他任何模块都无济于事-它们仍然会在日志中显示带有missing module标志
慕森卡
桃花长相依
相关分类