Как мне скомпилировать скрипт pyqt, который использует sqlalchemy? - PullRequest
0 голосов
/ 02 марта 2020

Я пытался использовать 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 не работает с этими инструментами, я могу использовать разные методы сохранения (это термин?) Для моего маленького сценария, если это необходимо.

Я собираю на ma c btw .

1 Ответ

1 голос
/ 03 марта 2020

Это произошло из-за того, что conda env испортила сборку. Просто создать venv - это хорошо (вы можете использовать conda для выбора python версии)

...