Python3 运行命令不存在时的错误信息

Python3 运行命令不存在时的错误信息

我必须升级 mu gnuradio,因此必须从源代码构建它(pybombs 不起作用),构建后,每当我在终端中输入不存在的命令时,我都会收到这些错误消息。存在的命令不会给出任何错误消息。

尽管 python3 是一个命令(当我在终端中输入 python 然后按下 tab 键时它就会显示出来),但我还是无法启动 python3 并收到相同的错误消息。

我认为这条路径有点错误,但我无法找到它。

:~$ not a command
Error processing line 1 of /home/erik/.local/lib/python3.5/site-packages/protobuf-3.8.0-py3.5-nspkg.pth:

Failed to import the site module
Traceback (most recent call last):
  File "/usr/lib/python3.5/site.py", line 173, in addpackage
    exec(line)
  File "<string>", line 1, in <module>
  File "/usr/lib/python3.5/types.py", line 166, in <module>
    import functools as _functools
  File "/usr/lib/python3.5/functools.py", line 21, in <module>
    from collections import namedtuple
  File "/usr/lib/python3.5/collections/__init__.py", line 32, in <module>
    from reprlib import recursive_repr as _recursive_repr
  File "/usr/local/lib/python2.7/dist-packages/reprlib/__init__.py", line 7, in <module>
    raise ImportError('This package should not be accessible on Python 3. '
ImportError: This package should not be accessible on Python 3. Either you are trying to run from the python-future src folder or your installation of python-future is corrupted.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.5/site.py", line 580, in <module>
    main()
  File "/usr/lib/python3.5/site.py", line 566, in main
    known_paths = addusersitepackages(known_paths)
  File "/usr/lib/python3.5/site.py", line 290, in addusersitepackages
    addsitedir(user_site, known_paths)
  File "/usr/lib/python3.5/site.py", line 212, in addsitedir
    addpackage(sitedir, name, known_paths)
  File "/usr/lib/python3.5/site.py", line 183, in addpackage
    import traceback
  File "/usr/lib/python3.5/traceback.py", line 3, in <module>
    import collections
  File "/usr/lib/python3.5/collections/__init__.py", line 32, in <module>
    from reprlib import recursive_repr as _recursive_repr
  File "/usr/local/lib/python2.7/dist-packages/reprlib/__init__.py", line 7, in <module>
    raise ImportError('This package should not be accessible on Python 3. '
ImportError: This package should not be accessible on Python 3. Either you are trying to run from the python-future src folder or your installation of python-future is corrupted.

相关内容