spyder: Cannot launch Spyder after updating to macOS 11 Big Sur, please help.
After updating my OS to macOS 11 today, I cannot seem to launch Spyder. I tried reinstall everything even reconstruct the python framework. Still does not work. When I run the following command in my terminal, the Spyder icon pops up but it stops there, nothing is being loaded and the Spyder window do not show up.
Last login: Fri Nov 13 16:07:21 on ttys000
Zhou@Jizhous-iMac ~ % Spyder/bin/spyder
I am not using Anaconda, I installed Spyder using pip.
How can I fix this? Thanks.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 64 (24 by maintainers)
You probably didn’t run it in the correct environment. You can just uninstall everything and try again. Let me update the instructions: Installation:
Run:
I could use this technique to launch the macOS appilcation but it is a bit laggy (not as bad as with Qt 5.9): https://stackoverflow.com/questions/16184505/set-environment-variable-for-the-process-before-startup
You need to add to
Spyder.app/Contents/Info.plist:Info.plist is cached, so it might not work directly. If that doesn’t work, the solution is to kill and rebuild the cache:
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -seedmy Info.plist now looks like:Adding os.environ[‘QT_MAC_WANTS_LAYER’] = ‘1’ fixes the issue on PyQT 5.15.1
https://stackoverflow.com/questions/64818879/is-there-any-solution-regarding-to-pyqt-library-doesnt-work-in-mac-os-big-sur
@ccordoba12 Two points:
I though this information might help.
@km5ar The following two methods given above worked for me:
Method 1:
Method 2:
I found a fix for the problem. Unfortunately, it is a bit controversial, at least for me. I am not using anaconda but the python 3.9 distribution form python.org and installed Spyder with pip. It always installed PyQt5 12.x. when I tried to upgrade to higher than PyQt5 >= 13.0 I was always told that Spyder requires PyQt5 < 13.0 and it is incompatible with PyQt5 13.x. so after a general upgrade I always uninstalled Spyder and reinstalled it, which led to having PyQt5 12.x. And it never worked in Big Sur. Today after seeing people installing various PqQt versions and having success I tried PyQt5 13.0 and ignored the pip error message that is not compatible with Spyder. To my surprise Spyder now works! And there is no keyboard lag. So what is this requirement of PyQt5 < 13 in the pypi Spyder distribution?
I also tried PqQt 15 and it did not work. But pyzo (comments from another thread) did work work with PyQt 13. So it must be a PyQt problem.
The following method might be helpful: https://github.com/spyder-ide/spyder/issues/14218#issuecomment-729257620
Hi Adam,
I am not using anaconda, so it is a more general issue. I just launch Spyder from the command line and the same thing happen. I hope it gets fixed soon because I use Spyder every day.
George
Same here. On all three of my Macs the same thing happened. After upgrading to Big Sur Spyder starts but the IDE never shows up. When I click on the Spyder icon in the dock it does not switch to Python in the title bar as before but stays in the terminal. I reinstalled my virtual environment, 3.9 then back to 3.8 it is the same. Any idea?