Open booc24 opened 2 months ago
spyder-env) CHANGs-MacBook-Pro:~ changbowen$ spyder
/opt/anaconda3/envs/spyder-env/bin/pythonw: line 3: 50508 Segmentation fault: 11 /opt/anaconda3/envs/spyder-env/python.app/Contents/MacOS/python "$@"
Already tried everything
Hey @booc24, thanks for reporting. Please try this to see if it helps:
conda install -f python.app
Let us know if that solves your problem.
There is still a problem after installing python.app ❯ spyder /opt/anaconda3/envs/env1/bin/pythonw: line 3: 29705 Segmentation fault: 11 /opt/anaconda3/envs/env1/python.app/Contents/MacOS/python "$@"
Then you can try to run
conda remove --force python.app
and after that
conda install python.app
to see if that solves the problem.
@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.
@mrclary, could you check this in your Mac? For that, please download the latest Anaconda and check if Spyder works for you in your computer after installing it.
I gather from the above comments:
/opt/anaconda3
)envs/env1
, envs/spyder-env
)/opt/anaconda3/bin
)Has anyone tried the latest version, Spyder 5.5.5?
I'll poke around and report back.
Okay, this issue only affects arm64 and python.app=3
(though I have not tested python.app=2
).
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.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.
Okay, this issue only affects arm64 and python.app=3 (though I have not tested python.app=2)
Thanks for checking this @mrclary! So python-app=2
works well for Python 3.8 to 3.11 in M1 Macs?
Spyder=5.5.1 + Python=3.9.19 + python.app=2 on M1 works fine. Spyder=5.5.1 + Python=3.11.9 + python.app=2 on M1 does not work:
Traceback (most recent call last):
File "/Users/ryan/.conda/envs/spy551_py311_defaults/bin/spyder", line 7, in <module>
from spyder.app.start import main
File "/Users/ryan/.conda/envs/spy551_py311_defaults/lib/python3.11/site-packages/spyder/app/start.py", line 28, in <module>
import random
File "/Users/ryan/.conda/envs/spy551_py311_defaults/lib/python3.11/random.py", line 49, in <module>
from math import log as _log, exp as _exp, pi as _pi, e as _e, ceil as _ceil
ImportError: dlopen(/Users/ryan/.conda/envs/spy551_py311_defaults/lib/python3.11/lib-dynload/math.cpython-311-darwin.so, 0x0002): symbol not found in flat namespace '__PyModule_Add'
Though I don't think this has anything to do with python.app=2. It appears something may be wrong with the python 3.11.9 build from the defaults channel.
@mrclary, and are there also startup errors with Python 3.12 from the defaults channel?
@mrclary, and are there also startup errors with Python 3.12 from the defaults channel?
Yes, due to python.app=3
. This is the condition for the original post.
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.12python.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.
This actually works for me. I'm using a Mac M1. Thank you!
Issue Report Checklist
conda update spyder
(orpip
, if not using Anaconda)jupyter qtconsole
(if console-related)spyder --reset
Problem Description
What steps reproduce the problem?
What is the expected output? What do you see instead?
Paste Traceback/Error Below (if applicable)
Versions
Dependencies
/opt/anaconda3/bin/pythonw: line 3: 51257 Segmentation fault: 11 /opt/anaconda3/python.app/Contents/MacOS/python "$@"