spyder: Cannot open spyder on Anaconda when using Mac

Issue Report Checklist

  • Searched the issues page for similar reports
  • Read the relevant sections of the Spyder Troubleshooting Guide and followed its advice
  • Reproduced the issue after updating with conda update spyder (or pip, if not using Anaconda)
  • Could not reproduce inside jupyter qtconsole (if console-related)
  • Tried basic troubleshooting (if a bug/error)
    • Restarted Spyder
    • Reset preferences with spyder --reset
    • Reinstalled the latest version of Anaconda
    • Tried the other applicable steps from the Troubleshooting Guide
  • Completed the Problem Description, Steps to Reproduce and Version sections below

Problem Description

What steps reproduce the problem?

What is the expected output? What do you see instead?

Paste Traceback/Error Below (if applicable)


PASTE TRACEBACK HERE

Versions

  • Spyder version:
  • Python version:
  • Qt version:
  • PyQt version:
  • Operating System name/version:

Dependencies

PASTE DEPENDENCIES HERE

/opt/anaconda3/bin/pythonw: line 3: 51257 Segmentation fault: 11 /opt/anaconda3/python.app/Contents/MacOS/python “$@”

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 21 (13 by maintainers)

Most upvoted comments

Okay, this issue only affects arm64 and python.app=3 (though I have not tested python.app=2).

  • the main channel only has python.app versions 2 and 3. Version 3 is what ships with Anaconda and is installed when creating additional environments for Spyder. Version 2 is not available for Python 3.12, only 3.8, 3.9, and 3.11.
  • the conda-forge channel only has python.app up to version 1.4, but this works.

I recommend creating a dedicated Spyder environment using the conda-forge channel:

(base) >> conda create -n spy-env -c conda-forge --override-channels python=3.12 spyder=5.5.5

This will install Python 3.12 and Spyder 5.5.5, but you can specify whichever Python or Spyder version you like by modifying the command accordingly. python.app=1.4 from conda-forge will be installed and Spyder should launch successfully.

I do not recommend installing python.app=1.4 into your Anaconda base environment or other existing environments that are created with packages from the main channel. Doing so will cause Python 3.12 to be reinstalled from the conda-forge channel and result in a mixed channel environment which may cause other issues.

Thanks, @cbouss!

Could you try updating python.app to the latest (conda install python.app) and verify whether the issue starting spyder is resolved?

conda create -n spy551 -c defaults --override-channels python=3.11 spyder=5.5.1
conda run --live-stream -n spy551 spyder

This now works for me.

* Spyder version: 5.5.1  (conda)
* Python version: 3.11.9 64-bit
* Qt version: 5.15.2
* PyQt5 version: 5.15.10
* Operating System: macOS-14.6.1-arm64-arm-64bit
* python.app: 3=py311h80987f9_1

So updating python.app (notice the *_1 build) in any Anaconda environment that uses the defaults channel should resolve the issue.

No issues @ccordoba12 , at least @mrclary id’d the issue and provided a solution! It seems like every semester there’s a new completely unrelated issue that crops up 😉.

First of all, thank you for this thread. I work at Anaconda and released today an updated version of the python.app package on our main channel. Could you try updating python.app to the latest (conda install python.app) and verify whether the issue starting spyder is resolved?

On the defaults channel for arm64:

  • python.app=3 is broken. This is available for Python 3.8, 3.9, 3.10, 3.11, and 3.12
  • python.app=2 seems to work, but is only available for Python 3.8, 3.9, and 3.11. But Python 3.11 seems to be broken due to a random package library issue.

Thus, is seems that the only working configuration on arm64 using defaults channel is Python 3.8 or 3.9 with python.app=2. I have found no issues with any configuration using the conda-forge channel.

@ccordoba12 I have the same issue. Brand new device (MacBook Pro M3 Max with the latest MacOS) with a freshly installed Anaconda Distro (today, 28th June 2024). The previously suggested solutions have not resolved the issue for me. The only thing that works is to create a new environment with Spyder 5.4.3, instead of 5.5.1.