Quantcast
Channel: Active questions tagged ubuntu - Stack Overflow
Viewing all articles
Browse latest Browse all 6144

Spyder 6 IPython console throws "An error ocurred while starting the kernel" when switching python interpreter

$
0
0

I have a fresh installation of Spyder 6.0.0 (Flatpak version) on Linux Mint 21.3 Cinnamon. I created a virtual environment with venv. When I change the interpreter via "Preferences > Python interpreter > Use the following Python interpreter" to the one of the virtual environment, the IPython console shows this error:

`An error ocurred while starting the kernelTraceback (most recent call last):File "/app/lib/python3.11/site‑packages/spyder_kernels/console/__main__.py", line 24, instart.main()File "/app/lib/python3.11/site‑packages/spyder_kernels/console/start.py", line 154, in mainimport_spydercustomize()File "/app/lib/python3.11/site‑packages/spyder_kernels/console/start.py", line 41, in import_spydercustomizeimport spydercustomize # noqa^^^^^^^^^^^^^^^^^^^^^^File "/app/lib/python3.11/site‑packages/spyder_kernels/customize/spydercustomize.py", line 19, infrom spyder_kernels.customize.spyderpdb import SpyderPdbFile "/app/lib/python3.11/site‑packages/spyder_kernels/customize/spyderpdb.py", line 22, infrom IPython.core.autocall import ZMQExitAutocallFile "/app/lib/python3.11/site‑packages/IPython/__init__.py", line 54, infrom .core.application import ApplicationFile "/app/lib/python3.11/site‑packages/IPython/core/application.py", line 26, infrom IPython.core import release, crashhandlerFile "/app/lib/python3.11/site‑packages/IPython/core/crashhandler.py", line 27, infrom IPython.core import ultratbFile "/app/lib/python3.11/site‑packages/IPython/core/ultratb.py", line 104, inimport stack_dataFile "/app/lib/python3.11/site‑packages/stack_data/__init__.py", line 1, infrom .core import Source, FrameInfo, markers_from_ranges, Options, LINE_GAP, Line, Variable, RangeInLine, \File "/app/lib/python3.11/site‑packages/stack_data/core.py", line 16, infrom asttokens.util import TokenFile "/app/lib/python3.11/site‑packages/asttokens/__init__.py", line 22, infrom .asttokens import ASTText, ASTTokens, supports_tokenlessFile "/app/lib/python3.11/site‑packages/asttokens/asttokens.py", line 23, inimport sixModuleNotFoundError: No module named 'six'Traceback (most recent call last):File "/usr/lib/python3.11/runpy.py", line 198, in _run_module_as_mainreturn _run_code(code, main_globals, None,^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^File "/usr/lib/python3.11/runpy.py", line 88, in _run_codeexec(code, run_globals)File "/app/lib/python3.11/site‑packages/spyder_kernels/console/__main__.py", line 24, instart.main()File "/app/lib/python3.11/site‑packages/spyder_kernels/console/start.py", line 154, in mainimport_spydercustomize()File "/app/lib/python3.11/site‑packages/spyder_kernels/console/start.py", line 41, in import_spydercustomizeimport spydercustomize # noqa^^^^^^^^^^^^^^^^^^^^^^File "/app/lib/python3.11/site‑packages/spyder_kernels/customize/spydercustomize.py", line 19, infrom spyder_kernels.customize.spyderpdb import SpyderPdbFile "/app/lib/python3.11/site‑packages/spyder_kernels/customize/spyderpdb.py", line 22, infrom IPython.core.autocall import ZMQExitAutocallFile "/app/lib/python3.11/site‑packages/IPython/__init__.py", line 54, infrom .core.application import ApplicationFile "/app/lib/python3.11/site‑packages/IPython/core/application.py", line 26, infrom IPython.core import release, crashhandlerFile "/app/lib/python3.11/site‑packages/IPython/core/crashhandler.py", line 27, infrom IPython.core import ultratbFile "/app/lib/python3.11/site‑packages/IPython/core/ultratb.py", line 104, inimport stack_dataFile "/app/lib/python3.11/site‑packages/stack_data/__init__.py", line 1, infrom .core import Source, FrameInfo, markers_from_ranges, Options, LINE_GAP, Line, Variable, RangeInLine, \File "/app/lib/python3.11/site‑packages/stack_data/core.py", line 16, infrom asttokens.util import TokenFile "/app/lib/python3.11/site‑packages/asttokens/__init__.py", line 22, infrom .asttokens import ASTText, ASTTokens, supports_tokenlessFile "/app/lib/python3.11/site‑packages/asttokens/asttokens.py", line 23, inimport sixModuleNotFoundError: No module named 'six'`

Switching back to Spyder's internal interpreter creates a working IPython console.

The Python version of the virtual environment is 3.10.12 (came with Linux mint), Spyder's internal Python version is 3.11.9.

The 'six' module is importable without error within the activated virtual environment as well as in the IPython console using Spyder's 'internal' interpreter.

Any ideas what is causing this error?


Viewing all articles
Browse latest Browse all 6144

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>