问题产生的原因
- 系统的python环境和ipython冲突,通过
pip list
可以查看当前系统的python模块
C:\Users\Administrator\AppData\Local\Programs\Python\Python36\python.exe "C:\Program Files\JetBrains\PyCharm 2017.3\helpers\pydev\pydevconsole.py" 3664 3665
Traceback (most recent call last):
File "C:\Program Files\JetBrains\PyCharm 2017.3\helpers\pydev\pydevconsole.py", line 515, in <module>
pydevconsole.start_server(host, int(port), int(client_port), client_host)
File "C:\Program Files\JetBrains\PyCharm 2017.3\helpers\pydev\pydevconsole.py", line 336, in start_server
interpreter = InterpreterInterface(client_host, client_port, threading.currentThread())
File "C:\Program Files\JetBrains\PyCharm 2017.3\helpers\pydev\_pydev_bundle\pydev_ipython_console.py", line 29, in __init__
self.interpreter = get_pydev_frontend(host, client_port, show_banner=show_banner)
File "C:\Program Files\JetBrains\PyCharm 2017.3\helpers\pydev\_pydev_bundle\pydev_ipython_console_011.py", line 496, in get_pydev_frontend
_PyDevFrontEndContainer._instance = _PyDevFrontEnd(show_banner=show_banner)
File "C:\Program Files\JetBrains\PyCharm 2017.3\helpers\pydev\_pydev_bundle\pydev_ipython_console_011.py", line 326, in __init__
self.ipython = PyDevTerminalInteractiveShell.instance()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\site-packages\traitlets\config\configurable.py", line 412, in instance
inst = cls(*args, **kwargs)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\site-packages\IPython\terminal\interactiveshell.py", line 459, in __init__
super(TerminalInteractiveShell, self).__init__(*args, **kwargs)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\site-packages\IPython\core\interactiveshell.py", line 676, in __init__
self.init_completer()
File "C:\Program Files\JetBrains\PyCharm 2017.3\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 2017.3\helpers\pydev\_pydev_bundle\pydev_ipython_console_011.py", line 208, in _new_completer_500
parent=self
File "C:\Program Files\JetBrains\PyCharm 2017.3\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.
image.png
解决问题,卸载ipython
pip uninstall ipython
C:\Users\Administrator>pip uninstall ipython
Uninstalling ipython-7.5.0:
Would remove:
c:\users\administrator\appdata\local\programs\python\python36\lib\site-packages\ipython-7.5.0.dist-info\*
c:\users\administrator\appdata\local\programs\python\python36\lib\site-packages\ipython\*
c:\users\administrator\appdata\local\programs\python\python36\scripts\iptest.exe
c:\users\administrator\appdata\local\programs\python\python36\scripts\iptest3.exe
c:\users\administrator\appdata\local\programs\python\python36\scripts\ipython.exe
c:\users\administrator\appdata\local\programs\python\python36\scripts\ipython3.exe
c:\users\administrator\appdata\local\programs\python\python36\share\man\man1\ipython.1.gz
Proceed (y/n)? y
Successfully uninstalled ipython-7.5.0
C:\Users\Administrator>
网友评论