Please ignore secret bonuses. Secret tests do NOT award bonus. Max hw grade is 30+2 bonus efficiency

Do you need help?

Spyder error after installing libraries

b
benedetta11 (820 points)
4 8 12
in HW1 optional by (820 points)
I installed all the required libraries to complete the assignment and after trying to launch spyder from anaconda navigator I got this error :

Traceback (most recent call last):
File "/Users/benedettadevincenzi/anaconda3/bin/spyder", line 7, in
from spyder.app.start import main
File "/Users/benedettadevincenzi/anaconda3/lib/python3.11/site-packages/spyder/app/start.py", line 28, in
import random
File "/Users/benedettadevincenzi/anaconda3/lib/python3.11/random.py", line 49, in
from math import log as _log, exp as _exp, pi as _pi, e as _e, ceil as _ceil
ImportError: dlopen(/Users/benedettadevincenzi/anaconda3/lib/python3.11/lib-dynload/math.cpython-311-darwin.so, 0x0002): symbol not found in flat namespace '__PyModule_Add'

I tried to uninstall and reinstall spyder but it still doesn't work. I'm on MacBook pro (m2) version Sonoma 14.0. Can anyone help me please?
301 views

1 Answer

aryanahamed (7920 points)
6 12 67
by (7.9k points)

The issue seems to be the python package not the spyder itself. Try updating python first,

conda update python

If you have multiple versions of Python installed, there might be a conflict between them. For example, a newer version of your python can point to the path of an older version of python package. Check for any conflicting native Python installations apart from the conda environment. Try uninstalling that. Also, make sure to verify the PYTHONPATH.

If updating Python doesn't resolve the issue, consider reinstalling Python or downgrading it.