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

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 kernel
Traceback (most recent call last):
File "/app/lib/python3.11/site‑packages/spyder_kernels/console/__main__.py", line 24, in
start.main()
File "/app/lib/python3.11/site‑packages/spyder_kernels/console/start.py", line 154, in main
import_spydercustomize()
File "/app/lib/python3.11/site‑packages/spyder_kernels/console/start.py", line 41, in import_spydercustomize
import spydercustomize # noqa
^^^^^^^^^^^^^^^^^^^^^^
File "/app/lib/python3.11/site‑packages/spyder_kernels/customize/spydercustomize.py", line 19, in
from spyder_kernels.customize.spyderpdb import SpyderPdb
File "/app/lib/python3.11/site‑packages/spyder_kernels/customize/spyderpdb.py", line 22, in
from IPython.core.autocall import ZMQExitAutocall
File "/app/lib/python3.11/site‑packages/IPython/__init__.py", line 54, in
from .core.application import Application
File "/app/lib/python3.11/site‑packages/IPython/core/application.py", line 26, in
from IPython.core import release, crashhandler
File "/app/lib/python3.11/site‑packages/IPython/core/crashhandler.py", line 27, in
from IPython.core import ultratb
File "/app/lib/python3.11/site‑packages/IPython/core/ultratb.py", line 104, in
import stack_data
File "/app/lib/python3.11/site‑packages/stack_data/__init__.py", line 1, in
from .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, in
from asttokens.util import Token
File "/app/lib/python3.11/site‑packages/asttokens/__init__.py", line 22, in
from .asttokens import ASTText, ASTTokens, supports_tokenless
File "/app/lib/python3.11/site‑packages/asttokens/asttokens.py", line 23, in
import six
ModuleNotFoundError: No module named 'six'
Traceback (most recent call last):
File "/usr/lib/python3.11/runpy.py", line 198, in _run_module_as_main
return _run_code(code, main_globals, None,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/runpy.py", line 88, in _run_code
exec(code, run_globals)
File "/app/lib/python3.11/site‑packages/spyder_kernels/console/__main__.py", line 24, in
start.main()
File "/app/lib/python3.11/site‑packages/spyder_kernels/console/start.py", line 154, in main
import_spydercustomize()
File "/app/lib/python3.11/site‑packages/spyder_kernels/console/start.py", line 41, in import_spydercustomize
import spydercustomize # noqa
^^^^^^^^^^^^^^^^^^^^^^
File "/app/lib/python3.11/site‑packages/spyder_kernels/customize/spydercustomize.py", line 19, in
from spyder_kernels.customize.spyderpdb import SpyderPdb
File "/app/lib/python3.11/site‑packages/spyder_kernels/customize/spyderpdb.py", line 22, in
from IPython.core.autocall import ZMQExitAutocall
File "/app/lib/python3.11/site‑packages/IPython/__init__.py", line 54, in
from .core.application import Application
File "/app/lib/python3.11/site‑packages/IPython/core/application.py", line 26, in
from IPython.core import release, crashhandler
File "/app/lib/python3.11/site‑packages/IPython/core/crashhandler.py", line 27, in
from IPython.core import ultratb
File "/app/lib/python3.11/site‑packages/IPython/core/ultratb.py", line 104, in
import stack_data
File "/app/lib/python3.11/site‑packages/stack_data/__init__.py", line 1, in
from .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, in
from asttokens.util import Token
File "/app/lib/python3.11/site‑packages/asttokens/__init__.py", line 22, in
from .asttokens import ASTText, ASTTokens, supports_tokenless
File "/app/lib/python3.11/site‑packages/asttokens/asttokens.py", line 23, in
import six
ModuleNotFoundError: 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?

New contributor

Mike is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa

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

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 kernel
Traceback (most recent call last):
File "/app/lib/python3.11/site‑packages/spyder_kernels/console/__main__.py", line 24, in
start.main()
File "/app/lib/python3.11/site‑packages/spyder_kernels/console/start.py", line 154, in main
import_spydercustomize()
File "/app/lib/python3.11/site‑packages/spyder_kernels/console/start.py", line 41, in import_spydercustomize
import spydercustomize # noqa
^^^^^^^^^^^^^^^^^^^^^^
File "/app/lib/python3.11/site‑packages/spyder_kernels/customize/spydercustomize.py", line 19, in
from spyder_kernels.customize.spyderpdb import SpyderPdb
File "/app/lib/python3.11/site‑packages/spyder_kernels/customize/spyderpdb.py", line 22, in
from IPython.core.autocall import ZMQExitAutocall
File "/app/lib/python3.11/site‑packages/IPython/__init__.py", line 54, in
from .core.application import Application
File "/app/lib/python3.11/site‑packages/IPython/core/application.py", line 26, in
from IPython.core import release, crashhandler
File "/app/lib/python3.11/site‑packages/IPython/core/crashhandler.py", line 27, in
from IPython.core import ultratb
File "/app/lib/python3.11/site‑packages/IPython/core/ultratb.py", line 104, in
import stack_data
File "/app/lib/python3.11/site‑packages/stack_data/__init__.py", line 1, in
from .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, in
from asttokens.util import Token
File "/app/lib/python3.11/site‑packages/asttokens/__init__.py", line 22, in
from .asttokens import ASTText, ASTTokens, supports_tokenless
File "/app/lib/python3.11/site‑packages/asttokens/asttokens.py", line 23, in
import six
ModuleNotFoundError: No module named 'six'
Traceback (most recent call last):
File "/usr/lib/python3.11/runpy.py", line 198, in _run_module_as_main
return _run_code(code, main_globals, None,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/runpy.py", line 88, in _run_code
exec(code, run_globals)
File "/app/lib/python3.11/site‑packages/spyder_kernels/console/__main__.py", line 24, in
start.main()
File "/app/lib/python3.11/site‑packages/spyder_kernels/console/start.py", line 154, in main
import_spydercustomize()
File "/app/lib/python3.11/site‑packages/spyder_kernels/console/start.py", line 41, in import_spydercustomize
import spydercustomize # noqa
^^^^^^^^^^^^^^^^^^^^^^
File "/app/lib/python3.11/site‑packages/spyder_kernels/customize/spydercustomize.py", line 19, in
from spyder_kernels.customize.spyderpdb import SpyderPdb
File "/app/lib/python3.11/site‑packages/spyder_kernels/customize/spyderpdb.py", line 22, in
from IPython.core.autocall import ZMQExitAutocall
File "/app/lib/python3.11/site‑packages/IPython/__init__.py", line 54, in
from .core.application import Application
File "/app/lib/python3.11/site‑packages/IPython/core/application.py", line 26, in
from IPython.core import release, crashhandler
File "/app/lib/python3.11/site‑packages/IPython/core/crashhandler.py", line 27, in
from IPython.core import ultratb
File "/app/lib/python3.11/site‑packages/IPython/core/ultratb.py", line 104, in
import stack_data
File "/app/lib/python3.11/site‑packages/stack_data/__init__.py", line 1, in
from .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, in
from asttokens.util import Token
File "/app/lib/python3.11/site‑packages/asttokens/__init__.py", line 22, in
from .asttokens import ASTText, ASTTokens, supports_tokenless
File "/app/lib/python3.11/site‑packages/asttokens/asttokens.py", line 23, in
import six
ModuleNotFoundError: 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?

New contributor

Mike is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật