ContinuumIO / anaconda-issues

Anaconda issue tracking
647 stars 220 forks source link

MacOS High Sierra Ananconda and Spyder both fail with Python 2.7+3.6 #10114

Open zhiyongxiao opened 6 years ago

zhiyongxiao commented 6 years ago

New to Mac and Ananconda, please advise in detail. Thank you.

Anaconda refuse to respond on click, Spyder does not launch and give errors (detail error info see below).

System: MacOS High Sierra Anaconda 1.7.1 cona 4.5.11 Spyder 3.3.1 Python 2.7 and Python 3.6** qt 5.9.6 (all packages in anaconda are installed by conda)

There are several other softwares on the Mac that also have their own libs, and I once used sudo port install python27 for the requirement of another software (which might not be necessary, but this step did not cause trouble for anaconda or spyder).

Actual Behavior

Built both python 3.6 and python 2.7 environments at Anaconda. Wished to launch Spyder via terminal, got the following wrong message:

This message occurred when I try to launch Spyder at both python 3.6 and python 2.7

`(python36) 192:~ zhiyongxiao$ spyder objc[8018]: Class RunLoopModeTracker is implemented in both /Applications/anaconda3/lib/libQt5Core.5.dylib (0xb199c5a80) and /ISIS3/isis/3rdParty/lib/QtCore.framework/Versions/5/QtCore (0xb261cf980). One of the two will be used. Which one is undefined. objc[8018]: Class NotificationReceiver is implemented in both /Applications/anaconda3/lib/libQt5Widgets.5.dylib (0xb1c3491c8) and /ISIS3/isis/3rdParty/lib/QtWidgets.framework/Versions/5/QtWidgets (0xb26939418). One of the two will be used. Which one is undefined. objc[8018]: Class QCocoaPageLayoutDelegate is implemented in both /Applications/anaconda3/lib/libQt5PrintSupport.5.dylib (0xb21b81ef0) and /ISIS3/isis/3rdParty/lib/QtPrintSupport.framework/Versions/5/QtPrintSupport (0xb26472ec0). One of the two will be used. Which one is undefined. objc[8018]: Class QCocoaPrintPanelDelegate is implemented in both /Applications/anaconda3/lib/libQt5PrintSupport.5.dylib (0xb21b81f40) and /ISIS3/isis/3rdParty/lib/QtPrintSupport.framework/Versions/5/QtPrintSupport (0xb26472f10). One of the two will be used. Which one is undefined. QObject::moveToThread: Current thread (0x7fefbe003630) is not the object's thread (0x7fffb1218380). Cannot move to target thread (0x7fefbe003630)

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. /Applications/anaconda3/bin/pythonw: line 3: 8018 Abort trap: 6 /Applications/anaconda3/python.app/Contents/MacOS/python "$@"`

With my limited understanding of how anaconda should be working, I have been struggling in the past five hours to look for a solution. Tried a lot staff, such as this one: https://github.com/ContinuumIO/anaconda-issues/issues/32

But all without success.

I 'thought' this should be a small issue, if I can clearly clarify which lib should be loaded when I wish to run Spyder or anaconda. I have tried to export the /Applications/anaconda3/envs/python27/lib/ to the path, but still no response.

Please Kindly advise how to solve this problem. Thank you.

ccordoba12 commented 6 years ago

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 "".

Sorry but this is a problem with your setup and not with Anaconda nor Spyder.

Please Kindly advise how to solve this problem. Thank you.

You should not install things globally with

sudo port install python27

but look instead how to use MacPorts locally.

zhiyongxiao commented 6 years ago

This question is also posted at the USGS ISIS thread https://github.com/USGS-Astrogeology/ISIS3/issues/441, we are working on it.