Reputation: 11
Teaching myself Python. Using tons of tools on a Windows computer for work and my Mac personally. On my Mac, I have been trying to get Qt and PySide2 to work together.
I was following this video tutorial. I got stuck at the 1:47 mark when I launched the terminal and got the following message in the terminal output.
Last login: Sat Aug 18 16:13:01 on ttys001 cd /anaconda3/lib/python3.6/site-packages/PySide2/examples/charts; Jasons-MacBook:~ jason$ cd /anaconda3/lib/python3.6/site-packages/PySide2/examples/charts; Jasons-MacBook:charts jason$ python memoryusage.py objc[9326]: Class RunLoopModeTracker is implemented in both /anaconda3/lib/python3.6/site-packages/PySide2/Qt/lib/QtCore.framework/Versions/5/QtCore (0x107fb6498) and /anaconda3/lib/libQt5Core.5.9.5.dylib (0x10d4d6a80). One of the two will be used. Which one is undefined. QObject::moveToThread: Current thread (0x7f9a27736ca0) is not the object's thread (0x7f9a29884c00). Cannot move to target thread (0x7f9a27736ca0)
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.
Please advise. Take note. I am not a computer expert but use Windows and Mac enough to get myself in trouble as per the above.
It appears to me the message is stating that it is confused with which Qt core to load based on the two locations given, then suggests a reinstall. When it states to reinstall the application, which one does it mean?
In conclusion, could some please advise how I can resolve the issue so I can continue to Qt for Python aka PySide2 tutorial video.
Best Regards.
Upvotes: 1
Views: 1925
Reputation: 938
I had similar issue while using GraphvizerViewer which requires installing PySide2. So I initially installed PySide2 using pip. After uninstall it and reinstall it via conda conda install -c conda-forge pyside2
, it works.
Upvotes: 2
Reputation: 649
Since you seem to be using Anaconda you should consider installing Pyside2 from the Anaconda Cloud.
The binaries seen in the tutorial you've posted are built for CPython (see the cp-tag), so I'd suggest you take the "Conda-Way" of installing PySide2.
Upvotes: 1