Python 3.x 使用PyInstaller的MacOSX下PyQt5和Cocoa之间的问题

Python 3.x 使用PyInstaller的MacOSX下PyQt5和Cocoa之间的问题,python-3.x,macos,pyqt5,pyinstaller,Python 3.x,Macos,Pyqt5,Pyinstaller,我安装了OSX Mavericks,以确保我正在开发的应用程序可以在这个系统上运行。我使用PyInstaller进行编译(我使用PyInstaller的构建脚本运行时没有错误) 问题是,当我双击可执行文件时,会出现以下错误: Last login: Wed Jan 16 22:56:18 on ttys004 Mac-Pro-de-angelo:~ angelo$ /Users/angelo/miniconda3/envs/apsc/apsc_1_0_0_onefile_mac_osx/apsc

我安装了OSX Mavericks,以确保我正在开发的应用程序可以在这个系统上运行。我使用PyInstaller进行编译(我使用PyInstaller的构建脚本运行时没有错误)

问题是,当我双击可执行文件时,会出现以下错误:

Last login: Wed Jan 16 22:56:18 on ttys004
Mac-Pro-de-angelo:~ angelo$ /Users/angelo/miniconda3/envs/apsc/apsc_1_0_0_onefile_mac_osx/apsc ; exit;
objc[5125]: Class RunLoopModeTracker is implemented in both /var/folders/t0/s6_p_gn15798z_8m8w5f6vjm0000gn/T/_MEIWgQ7yV/libQt5Core.5.dylib and /Users/angelo/miniconda3/envs/apsc/lib/libQt5Core.5.6.2.dylib. One of the two will be used. Which one is undefined.
objc[5125]: Class NotificationReceiver is implemented in both /var/folders/t0/s6_p_gn15798z_8m8w5f6vjm0000gn/T/_MEIWgQ7yV/libQt5Widgets.5.dylib and /Users/angelo/miniconda3/envs/apsc/lib/libQt5Widgets.5.6.2.dylib. One of the two will be used. Which one is undefined.
objc[5125]: Class QCocoaPageLayoutDelegate is implemented in both /var/folders/t0/s6_p_gn15798z_8m8w5f6vjm0000gn/T/_MEIWgQ7yV/libQt5PrintSupport.5.dylib and /Users/angelo/miniconda3/envs/apsc/lib/libQt5PrintSupport.5.6.2.dylib. One of the two will be used. Which one is undefined.
objc[5125]: Class QCocoaPrintPanelDelegate is implemented in both /var/folders/t0/s6_p_gn15798z_8m8w5f6vjm0000gn/T/_MEIWgQ7yV/libQt5PrintSupport.5.dylib and /Users/angelo/miniconda3/envs/apsc/lib/libQt5PrintSupport.5.6.2.dylib. One of the two will be used. Which one is undefined.
QObject::moveToThread: Current thread (0x7f9362f5b620) is not the object's thread (0x7f93640b2370).
Cannot move to target thread (0x7f9362f5b620)

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.
Abort trap: 6
logout

[Opération terminée]
如果我提到这篇文章:

我遇到了同样的问题,但建议的解决方案在我家不起作用

这就是我的PYInstaller脚本的运行方式:

/Users/angelo/miniconda3/envs/apsc/bin/pyinstaller --clean --windowed --onefile --runtime-tmpdir /var/folders/t0/s6_p_gn15798z_8m8w5f6vjm0000gn/T --icon=logo_apsc_256x256.icns --distpath apsc_1_0_0_onefile_mac_osx --name apsc apsc_gui.py
为了保证准确性,当直接从Python启动时,我的软件在MacOSX下运行良好

你能帮我找到解决办法吗

以下是我的说明:

MacOSX 10.9.5 Miniconda3-3.8.3下的Python 3.4.5、qt-5.6.2、sip-4.18和pyqt-5.6.0

。。。在

我真的很想解决这个问题,已经好几天了。。。我做不到

虽然有了一些改进,但我仍然有错误,在使用PyInstaller编译后,我仍然无法在MacOSX下启动我的软件(生成的应用程序)

我就是这么做的:

libpython3.6m.dylib和libpython3.6.dylib之间的符号链接(后者在miniconda3中创建的环境的bin目录中不存在):

然后我下了订单:

export DYLD_PRINT_RPATHS=1
应该注意的是,我发现自己有一个错误:

21966 ERROR: Can not find path ./libtbb.dylib (needed by /Users/angelo/miniconda3/envs/test/lib/libmkl_tbb_thread.dylib)
结果稍微好一点,但我总是发现自己有错误:

    objc[2619]: Class RunLoopModeTracker is implemented in both /private/var/folders/t0/s6_p_gn15798z_8m8w5f6vjm0000gn/T/_MEIqjVaY5/libQt5Core.5.dylib and /Users/angelo/miniconda3/envs/test/lib/libQt5Core.5.6.2.dylib. One of the two will be used. Which one is undefined.
objc[2619]: Class NotificationReceiver is implemented in both /private/var/folders/t0/s6_p_gn15798z_8m8w5f6vjm0000gn/T/_MEIqjVaY5/libQt5Widgets.5.dylib and /Users/angelo/miniconda3/envs/test/lib/libQt5Widgets.5.6.2.dylib. One of the two will be used. Which one is undefined.
QObject::moveToThread: Current thread (0x7ff483848540) is not the object's thread (0x7ff48385ab60).
Cannot move to target thread (0x7ff483848540)
。。。这是我无法摆脱的

如果有人能帮我我会很高兴的


请帮帮我。

有同样的问题,你解决了吗?
    objc[2619]: Class RunLoopModeTracker is implemented in both /private/var/folders/t0/s6_p_gn15798z_8m8w5f6vjm0000gn/T/_MEIqjVaY5/libQt5Core.5.dylib and /Users/angelo/miniconda3/envs/test/lib/libQt5Core.5.6.2.dylib. One of the two will be used. Which one is undefined.
objc[2619]: Class NotificationReceiver is implemented in both /private/var/folders/t0/s6_p_gn15798z_8m8w5f6vjm0000gn/T/_MEIqjVaY5/libQt5Widgets.5.dylib and /Users/angelo/miniconda3/envs/test/lib/libQt5Widgets.5.6.2.dylib. One of the two will be used. Which one is undefined.
QObject::moveToThread: Current thread (0x7ff483848540) is not the object's thread (0x7ff48385ab60).
Cannot move to target thread (0x7ff483848540)