如何编译使用sqlalchemy的pyqt脚本



我尝试使用pyinstaller和fbs将我的python脚本(只有一个(打包到一个独立的应用程序中。它们都没有错误,但当我尝试运行二进制pyinstaller时,它给出了这样的消息:

/Users/mac/Desktop/mtime/dist/main/main ; exit;
objc[53699]: Class RunLoopModeTracker is implemented in both /Users/mac/Desktop/mtime/dist/main/libQt5Core.5.dylib (0x1081dba80) and /Users/mac/miniconda3/envs/chessapp/lib/libQt5Core.5.9.7.dylib (0x10e377a80). One of the two will be used. Which one is undefined.
objc[53699]: Class NotificationReceiver is implemented in both /Users/mac/Desktop/mtime/dist/main/libQt5Widgets.5.dylib (0x1079691b8) and /Users/mac/miniconda3/envs/chessapp/lib/libQt5Widgets.5.9.7.dylib (0x10db051b8). One of the two will be used. Which one is undefined.
QObject::moveToThread: Current thread (0x7f8b98f27c80) is not the object's thread (0x7f8b9b08ff30).
Cannot move to target thread (0x7f8b98f27c80)
You might be loading two sets of Qt binaries into the same process. Check that all plugins are compiled against the right Qt binaries. Export DYLD_PRINT_LIBRARIES=1 and check that only one set of binaries are being loaded.
This application failed to start because it could not find or load the Qt platform plugin "cocoa"
in "".
Available platform plugins are: cocoa, minimal, offscreen.
Reinstalling the application may fix this problem

FBS也失败了。

我知道我做了两件有点不寻常的事情,我在脚本中使用了sqlalchemy和conda。

有人知道可能的解决方案吗?如果sqlalchemy不能很好地与这些工具配合使用,如果必要的话,我也愿意为我的小脚本使用不同的持久性方法(这是术语吗?(。

我在mac上编译btw.

这是由于conda-env扰乱了构建。只需创建一个venv就可以了(您可以使用conda来选择python版本(

最新更新