spyder-ide / spyder

Official repository for Spyder - The Scientific Python Development Environment
https://www.spyder-ide.org
MIT License
8.32k stars 1.61k forks source link

Can't launch Spyder through anaconda after trying to install jupyter package #22482

Closed robram945 closed 1 month ago

robram945 commented 1 month ago

Issue Report Checklist

Problem Description

Tried to install jupyter package using "conda install spyder-notebook -c conda-forge" and now cannot open spyder

What steps reproduce the problem?

  1. Launching anaconda
  2. Trying to launch spyder

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

Spyder just does not open get error code

Paste Traceback/Error Below (if applicable)


PASTE TRACEBACK HERE
Traceback (most recent call last):
File "/Users/anaconda3/bin/spyder", line 7, in 
from spyder.app.start import main
File "/Users/anaconda3/lib/python3.12/site-packages/spyder/app/start.py", line 25, in 
import ctypes
File "/Users/anaconda3/lib/python3.12/ctypes/__init__.py", line 8, in 
from _ctypes import Union, Structure, Array
ImportError: dlopen(/Users/anaconda3/lib/python3.12/lib-dynload/_ctypes.cpython-312-darwin.so, 0x0002): symbol not found in flat namespace '_CFBundleGetVersionNumber'

Versions

Dependencies

PASTE DEPENDENCIES HERE
robram945 commented 1 month ago

python version: 3.12.4 qt version: qt-main 5.15.2 pyqt version: 2.4.1 operating system: os

PhilipYip1988 commented 1 month ago

You are attempting to install a conda-forge (community channel) package into the Anaconda base Python environment which uses the anaconda (commercial channel).

The commercial channel is a limited set of packages, repackaged by Anaconda for use in their Anaconda base Python environment. The Anaconda base Python environment should generally be used "as is" with limited updates to the conda package manager and anaconda-navigator. Installation of community channel packages into the base Python environment, generally results in instabilities.

You should reinstall Anaconda and create a new Python environment (subinstallation of Python), with spyder-notebooks and the optional dependencies (seaborn installs, numpy, pandas and matplotlib, pyqt is needed for the interactive qt backend for matplotlib plots and the other dependencies are needed for pandas to read/write to various formats):

conda create -n spyder-env -c conda-forge python spyder spyder-notebook cython seaborn pyarrow sympy openpyxl xlrd xlsxwriter lxml sqlalchemy tabulate pyqt
ccordoba12 commented 1 month ago

@PhilipYip1988, thanks for chiming in and helping @robram945 with this problem.

@robram945, let us know if the command posted by @PhilipYip1988 helps you to solve your problem.

ccordoba12 commented 1 month ago

Closing due to lack of response.