解决Pycharm打开python console报错:Couldn't connect to console process

解决方法如下:

pip uninstall ipython

报错原因是pycharm自带了ipython,anaconda也有ipython,两者冲突了。

报错内容如下:

D:\Anaconda\python.exe "C:\Program Files\JetBrains\PyCharm Community Edition 2017.2.1\helpers\pydev\pydevconsole.py" 55859 55860
Traceback (most recent call last):
  File "C:\Program Files\JetBrains\PyCharm Community Edition 2017.2.1\helpers\pydev\pydevconsole.py", line 533, in 
    pydevconsole.start_server(pydev_localhost.get_localhost(), int(port), int(client_port))
  File "C:\Program Files\JetBrains\PyCharm Community Edition 2017.2.1\helpers\pydev\pydevconsole.py", line 359, in start_server
    interpreter = InterpreterInterface(host, client_port, threading.currentThread())
  File "C:\Program Files\JetBrains\PyCharm Community Edition 2017.2.1\helpers\pydev\_pydev_bundle\pydev_ipython_console.py", line 25, in __init__
    self.interpreter = get_pydev_frontend(host, client_port, show_banner=show_banner)
  File "C:\Program Files\JetBrains\PyCharm Community Edition 2017.2.1\helpers\pydev\_pydev_bundle\pydev_ipython_console_011.py", line 493, in get_pydev_frontend
    _PyDevFrontEndContainer._instance = _PyDevFrontEnd(show_banner=show_banner)
  File "C:\Program Files\JetBrains\PyCharm Community Edition 2017.2.1\helpers\pydev\_pydev_bundle\pydev_ipython_console_011.py", line 323, in __init__
    self.ipython = PyDevTerminalInteractiveShell.instance()
  File "D:\Anaconda\lib\site-packages\traitlets\config\configurable.py", line 412, in instance
    inst = cls(*args, **kwargs)
  File "D:\Anaconda\lib\site-packages\IPython\terminal\interactiveshell.py", line 459, in __init__
    super(TerminalInteractiveShell, self).__init__(*args, **kwargs)
  File "D:\Anaconda\lib\site-packages\IPython\core\interactiveshell.py", line 682, in __init__
    self.init_completer()
  File "C:\Program Files\JetBrains\PyCharm Community Edition 2017.2.1\helpers\pydev\_pydev_bundle\pydev_ipython_console_011.py", line 246, in init_completer
    self.Completer = self._new_completer_500()
  File "C:\Program Files\JetBrains\PyCharm Community Edition 2017.2.1\helpers\pydev\_pydev_bundle\pydev_ipython_console_011.py", line 208, in _new_completer_500
    parent=self
  File "C:\Program Files\JetBrains\PyCharm Community Edition 2017.2.1\helpers\pydev\_pydev_bundle\pydev_ipython_console_011.py", line 89, in __init__
    self.matchers.remove(self.python_matches)
ValueError: list.remove(x): x not in list
Process finished with exit code 1
Couldn't connect to console process.

 

你可能感兴趣的:(解决Pycharm打开python console报错:Couldn't connect to console process)