安装jupyter后pycharm的console报错list.remove(x): x not in list

python函数速查手册

之前pycharm一直正常,安装jupyter后,console中报错 list.remove(x): x not in list,搜了下解决方案,发现可能是jupyter安装的ipython版本太高,和pycharm冲突。

如果不想降ipython版本的话可以直接设置pycharm中不使用ipython就能解决问题。

Traceback (most recent call last):
  File "/Applications/PyCharm.app/Contents/helpers/pydev/pydevconsole.py", line 533, in <module>
    pydevconsole.start_server(pydev_localhost.get_localhost(), int(port), int(client_port))
  File "/Applications/PyCharm.app/Contents/helpers/pydev/pydevconsole.py", line 359, in start_server
    interpreter = InterpreterInterface(host, client_port, threading.currentThread())
  File "/Applications/PyCharm.app/Contents/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 "/Applications/PyCharm.app/Contents/helpers/pydev/_pydev_bundle/pydev_ipython_console_011.py", line 489, in get_pydev_frontend
    _PyDevFrontEndContainer._instance = _PyDevFrontEnd(show_banner=show_banner)
  File "/Applications/PyCharm.app/Contents/helpers/pydev/_pydev_bundle/pydev_ipython_console_011.py", line 320, in __init__
    self.ipython = PyDevTerminalInteractiveShell.instance()
  File "/Users/dengwenjing/opt/anaconda3/envs/pdenv/lib/python3.6/site-packages/traitlets/config/configurable.py", line 412, in instance
    inst = cls(*args, **kwargs)
  File "/Users/dengwenjing/opt/anaconda3/envs/pdenv/lib/python3.6/site-packages/IPython/terminal/interactiveshell.py", line 463, in __init__
    super(TerminalInteractiveShell, self).__init__(*args, **kwargs)
  File "/Users/dengwenjing/opt/anaconda3/envs/pdenv/lib/python3.6/site-packages/IPython/core/interactiveshell.py", line 682, in __init__
    self.init_completer()
  File "/Applications/PyCharm.app/Contents/helpers/pydev/_pydev_bundle/pydev_ipython_console_011.py", line 243, in init_completer
    self.Completer = self._new_completer_500()
  File "/Applications/PyCharm.app/Contents/helpers/pydev/_pydev_bundle/pydev_ipython_console_011.py", line 205, in _new_completer_500
    parent=self
  File "/Applications/PyCharm.app/Contents/helpers/pydev/_pydev_bundle/pydev_ipython_console_011.py", line 85, in __init__
    self.matchers.remove(self.python_matches)
ValueError: list.remove(x): x not in list

去掉下图勾选即可

在这里插入图片描述

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章