小编典典

Linux-奇怪的Python输出

linux

每当我在控制台中输入错误或出错时,都会出现以下消息:

Traceback (most recent call last):
  File "/usr/lib/python3.3/site.py", line 629, in <module>
    main()

  File "/usr/lib/python3.3/site.py", line 614, in main
    known_paths = addusersitepackages(known_paths)

  File "/usr/lib/python3.3/site.py", line 284, in addusersitepackages
    user_site = getusersitepackages()

  File "/usr/lib/python3.3/site.py", line 260, in getusersitepackages
    user_base = getuserbase() # this will also set USER_BASE

  File "/usr/lib/python3.3/site.py", line 250, in getuserbase
    USER_BASE = get_config_var('userbase')

  File "/usr/lib/python3.3/sysconfig.py", line 610, in get_config_var
    return get_config_vars().get(name)

  File "/usr/lib/python3.3/sysconfig.py", line 560, in get_config_vars
    _init_posix(_CONFIG_VARS)

  File "/usr/lib/python3.3/sysconfig.py", line 432, in _init_posix
    from _sysconfigdata import build_time_vars

  File "/usr/lib/python3.3/_sysconfigdata.py", line 6, in <module>   
    from _sysconfigdata_m import *

   ImportError: No module named '_sysconfigdata_m'

我同时使用Anaconda安装了Python 2.7和3.3。我想知道这是否正常还是python 2.7和3.3之间存在冲突


阅读 351

收藏
2020-06-07

共1个答案

小编典典

假设您使用的是ubuntu,这是相关的错误报告https://bugs.launchpad.net/ubuntu/+source/python3.3/+bug/1192890

您需要修补/etc/bash.bashrc。有关详细信息,请参见评论6。

2020-06-07