У меня установлено несколько версий python в Ubuntu 20.04 LTS
. Чтобы управлять ими, я установил pyenv , но после того, как я настроил его и запустил spyder , он выдает мне эту ошибку. Я не знаю, как решить эту проблему и почему это происходит?
Я поискал ошибку. Я обнаружил, что это происходит из-за конфликта путей. Итак, я добавил /usr/lib/python3
в PYTHONPATH MANAGER в моем spyder. Но после этого я даже не могу открыть Spyder.
An error ocurred while starting the kernel
Could not import runpy module
Error processing line 1 of /usr/local/lib/python3.8/dist‑packages/google_auth?.15.0‑py3.8‑nspkg.pth:
Traceback (most recent call last):
File "/usr/lib/python3.7/site.py", line 174, in addpackage
exec(line)
File "", line 1, in
File "/usr/lib/python3.7/importlib/__init__.py", line 51, in
_w_long = _bootstrap_external._w_long
AttributeError: module 'importlib._bootstrap_external' has no attribute '_w_long'
Remainder of file ignored
Error processing line 1 of /usr/local/lib/python3.8/dist‑packages/protobuf?.12.1‑py3.8‑nspkg.pth:
Traceback (most recent call last):
File "/usr/lib/python3.7/site.py", line 174, in addpackage
exec(line)
File "", line 1, in
File "/usr/lib/python3.7/importlib/__init__.py", line 51, in
_w_long = _bootstrap_external._w_long
AttributeError: module 'importlib._bootstrap_external' has no attribute '_w_long'
Remainder of file ignored
Error processing line 1 of /usr/lib/python3/dist‑packages/logilab_common?.4.3‑nspkg.pth:
Traceback (most recent call last):
File "/usr/lib/python3.7/site.py", line 174, in addpackage
exec(line)
File "", line 1, in
File "/usr/lib/python3.7/importlib/__init__.py", line 51, in
_w_long = _bootstrap_external._w_long
AttributeError: module 'importlib._bootstrap_external' has no attribute '_w_long'
Remainder of file ignored
Error processing line 1 of /usr/lib/python3/dist‑packages/matplotlib?.1.2‑nspkg.pth:
Traceback (most recent call last):
File "/usr/lib/python3.7/site.py", line 174, in addpackage
exec(line)
File "", line 1, in
File "/usr/lib/python3.7/importlib/__init__.py", line 51, in
_w_long = _bootstrap_external._w_long
AttributeError: module 'importlib._bootstrap_external' has no attribute '_w_long'
Remainder of file ignored
Traceback (most recent call last):
File "/usr/lib/python3.7/runpy.py", line 14, in
import importlib.machinery # importlib first so we can test #15386 via ‑m
File "/usr/lib/python3.7/importlib/__init__.py", line 51, in
_w_long = _bootstrap_external._w_long
AttributeError: module 'importlib._bootstrap_external' has no attribute '_w_long'
Версия Spyder: 4.1.2
При запуске whereis python вот что я получаю
/usr/bin/python3.8
/usr/bin/python3.7m
/usr/bin/python
/usr/bin/python3.8-config
/usr/bin/python2.7
/usr/bin/python3.7-config
/usr/bin/python3.7
/usr/bin/python3.7m-config
/usr/lib/python3.8
/usr/lib/python2.7
/usr/lib/python3.7
/usr/lib/python3.6
/etc/python3.8
/etc/python
/etc/python2.7
/etc/python3.7
/etc/python3.6
/usr/local/lib/python3.8
/usr/local/lib/python2.7
/usr/local/lib/python3.7
/usr/include/python3.8
/usr/include/python3.7m
/usr/include/python2.7
/usr/include/python3.7
/usr/share/python
/home/username/.pyenv/shims/python3.7
/home/username/.pyenv/shims/python3.7m-config
/home/username/.pyenv/shims/python3.7m
/home/username/.pyenv/shims/python
/home/username/.pyenv/shims/python3.7-config