spyder-ide / spyder

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

An error ocurred while starting the kernel #18186

Closed yewen18 closed 9 months ago

yewen18 commented 2 years ago

Issue Report Checklist

Problem Description

Spyder was working fine until yesterday when I opened it and got an error.

What steps reproduce the problem?

  1. Open spyder

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

Not working properly with Spyder

Paste Traceback/Error Below (if applicable)


An error ocurred while starting the kernel
The error is:

Traceback (most recent call last):
File "D:\Users\yewen\Anaconda3\lib\site‑packages\spyder\plugins\ipythonconsole\plugin.py", line 1568, in create_kernel_manager_and_kernel_client
kernel_manager.start_kernel(stderr=stderr_handle,
File "D:\Users\yewen\Anaconda3\lib\site‑packages\jupyter_client\manager.py", line 337, in start_kernel
kernel_cmd, kw = self.pre_start_kernel(**kw)
File "D:\Users\yewen\Anaconda3\lib\site‑packages\jupyter_client\manager.py", line 286, in pre_start_kernel
self.write_connection_file()
File "D:\Users\yewen\Anaconda3\lib\site‑packages\jupyter_client\connect.py", line 466, in write_connection_file
self.connection_file, cfg = write_connection_file(self.connection_file,
File "D:\Users\yewen\Anaconda3\lib\site‑packages\jupyter_client\connect.py", line 136, in write_connection_file
with secure_write(fname) as f:
File "D:\Users\yewen\Anaconda3\lib\contextlib.py", line 119, in __enter__
return next(self.gen)
File "D:\Users\yewen\Anaconda3\lib\site‑packages\jupyter_core\paths.py", line 893, in secure_write
win32_restrict_file_to_user(fname)
File "D:\Users\yewen\Anaconda3\lib\site‑packages\jupyter_core\paths.py", line 446, in win32_restrict_file_to_user
sd = win32security.GetFileSecurity(fname, win32security.DACL_SECURITY_INFORMATION)
pywintypes.error: (50, 'GetFileSecurity', 'Die Anforderung wird nicht unterstützt.')

Versions

Dependencies


# Mandatory:
atomicwrites >=1.2.0          :  1.4.0 (OK)
chardet >=2.0.0               :  4.0.0 (OK)
cloudpickle >=0.5.0           :  2.0.0 (OK)
cookiecutter >=1.6.0          :  1.7.3 (OK)
diff_match_patch >=20181111   :  20200713 (OK)
intervaltree >=3.0.2          :  3.1.0 (OK)
IPython >=7.6.0               :  8.3.0 (OK)
jedi >=0.17.2;<0.19.0         :  0.18.1 (OK)
jsonschema >=3.2.0            :  4.4.0 (OK)
keyring >=17.0.0              :  23.4.0 (OK)
nbconvert >=4.0               :  6.4.4 (OK)
numpydoc >=0.6.0              :  1.2 (OK)
paramiko >=2.4.0              :  2.8.1 (OK)
parso >=0.7.0;<0.9.0          :  0.8.3 (OK)
pexpect >=4.4.0               :  4.8.0 (OK)
pickleshare >=0.4             :  0.7.5 (OK)
psutil >=5.3                  :  5.8.0 (OK)
pygments >=2.0                :  2.11.2 (OK)
pylint >=2.5.0;<2.10.0        :  2.9.6 (OK)
pyls_spyder >=0.4.0           :  0.4.0 (OK)
pylsp >=1.2.2;<1.3.0          :  1.2.4 (OK)
pylsp_black >=1.0.0           :  None (OK)
qdarkstyle =3.0.2             :  3.0.2 (OK)
qstylizer >=0.1.10            :  0.1.10 (OK)
qtawesome >=1.0.2             :  1.0.3 (OK)
qtconsole >=5.1.0             :  5.3.0 (OK)
qtpy >=1.5.0                  :  2.0.1 (OK)
rtree >=0.9.7                 :  0.9.7 (OK)
setuptools >=49.6.0           :  61.2.0 (OK)
sphinx >=0.6.6                :  4.4.0 (OK)
spyder_kernels >=2.1.1;<2.2.0 :  2.1.3 (OK)
textdistance >=4.2.0          :  4.2.1 (OK)
three_merge >=0.1.1           :  0.1.1 (OK)
watchdog >=0.10.3             :  2.1.6 (OK)
zmq >=17                      :  22.3.0 (OK)

# Optional:
cython >=0.21                 :  0.29.28 (OK)
matplotlib >=2.0.0            :  3.5.1 (OK)
numpy >=1.7                   :  1.21.5 (OK)
pandas >=1.1.1                :  1.4.2 (OK)
scipy >=0.17.0                :  1.7.3 (OK)
sympy >=0.7.3                 :  1.10.1 (OK)
yewen18 commented 2 years ago

-delete the python folder in the appdata folder -Create a new environment to run Spyder I have tried both of these and the problem has not been solved

steff456 commented 2 years ago

Hi @yewen18,

I wanted to know how are you installing Spyder? Are you using the windows installers or are you trying with conda? Please let me know in the case you are using conda if you are using the defaults channel or the conda forge channel.

yewen18 commented 2 years ago

Hi @yewen18,

I wanted to know how are you installing Spyder? Are you using the windows installers or are you trying with conda? Please let me know in the case you are using conda if you are using the defaults channel or the conda forge channel.

hi @steff456, I installed spyder via anaconda. After installing anaconda, spyder is already showing installed in the main page.

ztrg commented 2 years ago

I have the same problem, I came form a problem with the "input" and install the version 3.10 something, and know i have this problem where the ipython console doesn't work, it says "conecting to kernel"

yewen18 commented 2 years ago

@steff456 Will this error still be resolved?

steff456 commented 2 years ago

@yewen18 ,the new environment where you are trying to install spyder-kernels uses Python 3.10? Also, why are you removing the python folder from the appdata folder?

ccordoba12 commented 9 months ago

Closing due to lack of response.