SiEPIC / SiEPIC_testcreator

A graphical user inferface to allow users to create and format their own YAML files for testing with UBC and DreamLab probe stations
MIT License
1 stars 4 forks source link

Got this message running it on my Mac M1 #1

Open omidesml opened 3 months ago

omidesml commented 3 months ago

Successfully installed DreamCreator-0.0.3 PyQt5-Qt5-5.15.13 matplotlib-3.8.2 nh3-0.2.17 numpy-1.26.3 pandas-2.2.0 pkginfo-1.10.0 pywin32-ctypes-0.2.2 readme-renderer-43.0 rfc3986-2.0.0 scipy-1.12.0 twine-5.0.0 watchdog-3.0.0 (base) omidesmaeeli@dhcp-206-12-143-165 ~ % python3.11 Python 3.11.8 (main, Feb 26 2024, 15:36:12) [Clang 14.0.6 ] on darwin Type "help", "copyright", "credits" or "license" for more information.

from dreamcreator import sequencecreator sequencecreator.launch()

objc[10634]: Class QMacAutoReleasePoolTracker is implemented in both /Users/omidesmaeeli/anaconda3/lib/libQt5Core.5.15.2.dylib (0x10450d340) and /Users/omidesmaeeli/anaconda3/lib/python3.11/site-packages/PyQt5/Qt5/lib/QtCore.framework/Versions/5/QtCore (0x10b045230). One of the two will be used. Which one is undefined. objc[10634]: Class QT_ROOT_LEVEL_POOL__THESE_OBJECTS_WILL_BE_RELEASED_WHEN_QAPP_GOES_OUT_OF_SCOPE is implemented in both /Users/omidesmaeeli/anaconda3/lib/libQt5Core.5.15.2.dylib (0x10450d3b8) and /Users/omidesmaeeli/anaconda3/lib/python3.11/site-packages/PyQt5/Qt5/lib/QtCore.framework/Versions/5/QtCore (0x10b0452a8). One of the two will be used. Which one is undefined. objc[10634]: Class KeyValueObserver is implemented in both /Users/omidesmaeeli/anaconda3/lib/libQt5Core.5.15.2.dylib (0x10450d3e0) and /Users/omidesmaeeli/anaconda3/lib/python3.11/site-packages/PyQt5/Qt5/lib/QtCore.framework/Versions/5/QtCore (0x10b0452d0). One of the two will be used. Which one is undefined. objc[10634]: Class RunLoopModeTracker is implemented in both /Users/omidesmaeeli/anaconda3/lib/libQt5Core.5.15.2.dylib (0x10450d430) and /Users/omidesmaeeli/anaconda3/lib/python3.11/site-packages/PyQt5/Qt5/lib/QtCore.framework/Versions/5/QtCore (0x10b045320). One of the two will be used. Which one is undefined. QObject::moveToThread: Current thread (0x6000033fc140) is not the object's thread (0x6000033f1250). Cannot move to target thread (0x6000033fc140)

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. qt.qpa.plugin: Could not load the Qt platform plugin "cocoa" in "" even though it was found. This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: cocoa, minimal, offscreen, webgl.

zsh: abort python3.11

JymBone5 commented 3 months ago

Understanding the Error:

Conflicting Qt Binaries: You seem to have two separate Qt installations on your system. One is likely from Anaconda (/Users/omidesmaeeli/anaconda3/lib/libQt5Core.5.15.2.dylib), and the other might be a system-wide installation or one from a different source (/Users/omidesmaeeli/anaconda3/lib/python3.11/site-packages/PyQt5/Qt5/lib/QtCore.framework/Versions/5/QtCore). Class Collisions: Classes like QMacAutoReleasePoolTracker and QT_ROOT_LEVEL_POOL__THESE_OBJECTS_WILL_BE_RELEASED_WHEN_QAPP_GOES_OUT_OF_SCOPE are defined in both Qt installations, causing confusion for the system. Troubleshooting Steps:

Identify Conflicting Qt:

Set the environment variable DYLD_PRINT_LIBRARIES=1. Run your program again. This will print detailed information about the loaded libraries. Look for Qt libraries being loaded from both Anaconda and potentially system-wide locations. Resolving the Conflict:

Option 1: Use Anaconda Qt: If you prefer using Anaconda's Qt, ensure your program exclusively loads libraries from there. You might need to adjust library paths in your build process or virtual environment configuration. Option 2: Use System-wide Qt: If you prefer the system-wide Qt, remove any conflicting PyQt bindings from Anaconda. You can achieve this by creating a virtual environment without PyQt or removing the package using conda remove pyqt. Reinstalling PyQt (if necessary):

If you're unsure about the conflicting Qt or if the above steps don't resolve the issue, try reinstalling PyQt in your Anaconda environment using conda install pyqt. This might reinstall necessary libraries and fix the conflict. Additional Tips:

Consider using tools like pyinstaller or similar to create standalone executables for your program. These tools can bundle necessary libraries within the executable, avoiding conflicts with system-wide installations. Consult the official PyQt documentation for troubleshooting and best practices specific to PyQt and Qt on macOS: https://riverbankcomputing.com/software/pyqt/intro By following these steps and understanding the root cause of the conflict, you should be able to resolve the issue and successfully run your PyQt application on your Mac.