1. ホーム
  2. パチャーム

pycharmのPython Consoleがエラーを報告する。AttributeError: can't set attribute, Couldn't connect to console process.

2022-02-10 06:04:20

パソコンを変えて、Anaconda3-5.1.0-Windows-x86_64(pythonのバージョンは3.6.4)、pycharm community editionをインストールし、環境を設定した後、次のようになりました。
一番下のPython Consoleをクリックすると、以下のようなエラーが報告されます。

Traceback (most recent call last):


File "D:\Pycharm Files\PyCharm Community Edition 2019.2\helpers\pydev\pydevconsole.py", line 483, in 


pydevconsole.start_client(host, port)


File "D:\Pycharm Files\PyCharm Community Edition 2019.2\helpers\pydev\pydevconsole.py", line 397, in start_client


interpreter = InterpreterInterface(threading.currentThread(), rpc_client=client)


File "D:\Pycharm Files\PyCharm Community Edition 2019.2\helpers\pydev_pydev_bundle\pydev_ipython_console.py", line 19, in 
init


self.interpreter = get_pydev_frontend(rpc_client)


File "D:\Pycharm Files\PyCharm Community Edition 2019.2\helpers\pydev_pydev_bundle\pydev_ipython_console_011.py ", line 490, in get_pydev_frontend


_PyDevFrontEndContainer._instance = _PyDevFrontEnd()


File "D:\Pycharm Files\PyCharm Community Edition 2019.2\helpers\pydev_pydev_bundle\pydev_ipython_console_011.py ", line 339, 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 425, in 
init


super(TerminalInteractiveShell, self).
init
(*args, **kwargs)


File "D:\Anaconda\lib\site-packages\IPython\core\interactiveshell.py", line 488, in 
init


self.init_completer()


File "D:\Pycharm Files\PyCharm Community Edition 2019.2\helpers\pydev_pydev_bundle\pydev_ipython_console_011.py ", line 261, in init_completer


self.Completer = self._new_completer_600()


File "D:\Pycharm Files\PyCharm Community Edition 2019.2\helpers\pydev_pydev_bundle\pydev_ipython_console_011.py ", line 223, in _new_completer_600


parent=self


File "D:\Pycharm Files\PyCharm Community Edition 2019.2\helpers\pydev_pydev_bundle\pydev_ipython_console_011.py ", line 94, in 
init


IPCompleter.
init
(self, *args, **kwargs)


File "D:\Anaconda\lib\site-packages\IPython\core\completer.py", line 1110, in 
init


self.dict_key_matches,


AttributeError: can't set attribute


Couldn't connect to console process.

解決策1
pycharmでipythonを使用しない

利用可能であればipythonを使用する------------ 利用可能であればipythonを使用する

解決策2.
1. pycharmを閉じる
2、コマンドラインを開き、pip uninstall ipython ,uninstall ipythonを入力します。
3、次にpip install ipythonと入力し、最新バージョンのipythonを再インストールします。
4、pycharmを開き、Python Consoleをクリックし、正常に解決する。