我什么都不做就得到了这个错误。
Traceback (most recent call last):
File "C:\Program Files\JetBrains\PyCharm 2018.1.4\helpers\pydev\pydevconsole.py", line 8, in <module>
from code import InteractiveConsole
ImportError: cannot import name 'InteractiveConsole' from 'code' (C:\Users\jainil\PycharmProjects\untitled\code.py)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Program Files\JetBrains\PyCharm 2018.1.4\helpers\pydev\pydev_run_in_console.py", line 7, in <module>
from pydevconsole import InterpreterInterface, process_exec_queue, start_console_server, init_mpl_in_console
File "C:\Program Files\JetBrains\PyCharm 2018.1.4\helpers\pydev\pydevconsole.py", line 10, in <module>
from _pydevd_bundle.pydevconsole_code_for_ironpython import InteractiveConsole
File "C:\Program Files\JetBrains\PyCharm 2018.1.4\helpers\pydev\_pydevd_bundle\pydevconsole_code_for_ironpython.py", line 105
except SyntaxError, err:
^
SyntaxError: invalid syntax
closed pycharm
这是一个令人讨厌的问题。有人可以帮忙吗? 谁能告诉我我做了什么?
答案 0 :(得分:1)
我不小心在工作目录中创建了code.py。只是命名问题。所以我的建议是不要在pycharm项目中创建code.py。它会破坏你的pycharm。我刚刚从我的项目中删除了该python文件,现在一切都很好。非常感谢您的帮助。交互式控制台仅被一个文件code.py
损坏