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)

Most upvoted comments

You probably didn’t run it in the correct environment. You can just uninstall everything and try again. Let me update the instructions: Installation:

conda create -n spyder-dev python=3
conda activate spyder-dev
pip install -U spyder

Run:

conda activate spyder-dev
export QT_MAC_WANTS_LAYER=1
spyder

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 :

<key>LSEnvironment</key>
<dict>
    <key>QT_MAC_WANTS_LAYER</key>
    <string>1</string>
</dict>

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 -seed my Info.plist now looks like:

``` <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>LSEnvironment</key> <dict> <key>QT_MAC_WANTS_LAYER</key> <string>1</string> </dict> <key>CFBundleDevelopmentRegion</key> <string>English</string> <key>CFBundleDisplayName</key> <string>Spyder</string> <key>CFBundleDocumentTypes</key> <array> <dict> <key>CFBundleTypeExtensions</key> <array> <string>py</string> <string>pyw</string> <string>ipy</string> <string>pyx</string> <string>pxd</string> <string>pxi</string> <string>c</string> <string>h</string> <string>cc</string> <string>cpp</string> <string>cxx</string> <string>h</string> <string>hh</string> <string>hpp</string> <string>hxx</string> <string>cl</string> <string>f</string> <string>for</string> <string>f77</string> <string>f90</string> <string>f95</string> <string>f2k</string> <string>f03</string> <string>f08</string> <string>pro</string> <string>m</string> <string>jl</string> <string>yaml</string> <string>yml</string> <string>patch</string> <string>diff</string> <string>rej</string> <string>bat</string> <string>cmd</string> <string>txt</string> <string>txt</string> <string>rst</string> <string>po</string> <string>pot</string> <string>nsi</string> <string>nsh</string> <string>scss</string> <string>css</string> <string>htm</string> <string>html</string> <string>xml</string> <string>js</string> <string>json</string> <string>ipynb</string> <string>enaml</string> <string>properties</string> <string>session</string> <string>ini</string> <string>inf</string> <string>reg</string> <string>cfg</string> <string>desktop</string> <string>md</string> </array> <key>CFBundleTypeName</key> <string>Text File</string> <key>CFBundleTypeRole</key> <string>Editor</string> </dict> </array> <key>CFBundleExecutable</key> <string>Spyder</string> <key>CFBundleIconFile</key> <string>spyder.icns</string> <key>CFBundleIdentifier</key> <string>org.spyder-ide</string> <key>CFBundleInfoDictionaryVersion</key> <string>6.0</string> <key>CFBundleName</key> <string>Spyder</string> <key>CFBundlePackageType</key> <string>APPL</string> <key>CFBundleShortVersionString</key> <string>4.2.0</string> <key>CFBundleSignature</key> <string>????</string> <key>CFBundleVersion</key> <string>0.0.0</string> <key>LSHasLocalizedDisplayName</key> <false/> <key>NSAppleScriptEnabled</key> <false/> <key>NSHumanReadableCopyright</key> <string>Copyright not specified</string> <key>NSMainNibFile</key> <string>MainMenu</string> <key>NSPrincipalClass</key> <string>NSApplication</string> <key>PyMainFileNames</key> <array> <string>__boot__</string> </array> <key>PyOptions</key> <dict> <key>alias</key> <false/> <key>argv_emulation</key> <false/> <key>emulate_shell_environment</key> <false/> <key>no_chdir</key> <false/> <key>prefer_ppc</key> <false/> <key>site_packages</key> <false/> <key>use_faulthandler</key> <false/> <key>use_pythonpath</key> <false/> <key>verbose</key> <false/> </dict> <key>PyResourcePackages</key> <array/> <key>PyRuntimeLocations</key> <array> <string>@executable_path/../Frameworks/Python.framework/Versions/3.8/Python</string> </array> <key>PythonInfoDict</key> <dict> <key>PythonExecutable</key> <string>/usr/local/opt/python@3.8/bin/python3.8</string> <key>PythonLongVersion</key> <string>3.8.6 (default, Oct 8 2020, 14:06:32) [Clang 12.0.0 (clang-1200.0.32.2)]</string> <key>PythonShortVersion</key> <string>3.8</string> <key>py2app</key> <dict> <key>alias</key> <false/> <key>template</key> <string>app</string> <key>version</key> <string>0.22</string> </dict> </dict> </dict> </plist> ```

@ccordoba12 Two points:

  • I have noticed that the same issue exists with other pyqt applications. The app launches but nothing shows.
  • I rolled back the pyqt version to 5.9 and tried launching spyder from the source code and it is working fine.

I though this information might help.

@km5ar The following two methods given above worked for me:

Method 1:

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 :

<key>LSEnvironment</key>
<dict>
    <key>QT_MAC_WANTS_LAYER</key>
    <string>1</string>
</dict>

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 -seed my Info.plist now looks like:

Method 2:

You probably didn’t run it in the correct environment. You can just uninstall everything and try again. Let me update the instructions: Installation:

conda create -n spyder-dev python=3
conda activate spyder-dev
pip install -U spyder

Run:

conda activate spyder-dev
export QT_MAC_WANTS_LAYER=1
spyder

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.

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

On Nov 13, 2020, at 16:45, Adam notifications@github.com wrote:

I’m also experiencing this issue when attempting to launch Spyder using Anaconda Navigator. After upgrading to Big Sur, the Spyder icon will appear in the Dock, but never load.

When attempting to load Spyder from the Terminal, it appears to never make it past line 3 of: /Users/adam/opt/anaconda3/envs/icebergdrift/bin/pythonw

#!/bin/bash export PYTHONEXECUTABLE=/Users/adam/opt/anaconda3/envs/icebergdrift/bin/python /Users/adam/opt/anaconda3/envs/icebergdrift/python.app/Contents/MacOS/python “$@” Additionally, spyder --debug-info verbose --debug-output file does not produce any debugging information to the Terminal.

Keen to learn what the cause and/or solution is!

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/spyder-ide/spyder/issues/14222#issuecomment-727087402, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQBKEOZAHHWM5X5WFLRKGHDSPXAIHANCNFSM4TVBWMKQ.

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?