安裝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

去掉下圖勾選即可

在這裏插入圖片描述

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