標籤:

使用PyCharm時無法啟動控制台?

今天打開PyCharm時突然無法啟動控制台,IPython和Python本身都無法使用,報錯如下,試過卸載重裝都不行,Python版本3.5.2,今天剛剛更新,之前是3.4也是出現這個問題,尋求幫助,謝謝!

F:Pythonpython.exe "F:PyCharm Community Edition 2016.1.4helperspydevpydevconsole.py" 57742 57743

Traceback (most recent call last):

File "F:PyCharm Community Edition 2016.1.4helperspydevpydevconsole.py", line 506, in &

pydevconsole.start_server(pydev_localhost.get_localhost(), int(port), int(client_port))

File "F:PyCharm Community Edition 2016.1.4helperspydevpydevconsole.py", line 348, in start_server

interpreter = InterpreterInterface(host, client_port, threading.currentThread())

File "F:PyCharm Community Edition 2016.1.4helperspydev\_pydev_bundlepydev_ipython_console.py", line 26, in __init__

self.interpreter = get_pydev_frontend(host, client_port, show_banner=show_banner)

File "F:PyCharm Community Edition 2016.1.4helperspydev\_pydev_bundlepydev_ipython_console_011.py", line 473, in get_pydev_frontend

_PyDevFrontEndContainer._instance = _PyDevFrontEnd(show_banner=show_banner)

File "F:PyCharm Community Edition 2016.1.4helperspydev\_pydev_bundlepydev_ipython_console_011.py", line 303, in __init__

self.ipython = PyDevTerminalInteractiveShell.instance()

File "F:Pythonlibsite-packages raitletsconfigconfigurable.py", line 412, in instance

inst = cls(*args, **kwargs)

File "F:Pythonlibsite-packagesIPython erminalinteractiveshell.py", line 359, in __init__

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

File "F:Pythonlibsite-packagesIPythoncoreinteractiveshell.py", line 487, in __init__

self.init_completer()

File "F:PyCharm Community Edition 2016.1.4helperspydev\_pydev_bundlepydev_ipython_console_011.py", line 222, in init_completer

self.Completer = self._new_completer_200()

File "F:PyCharm Community Edition 2016.1.4helperspydev\_pydev_bundlepydev_ipython_console_011.py", line 194, in _new_completer_200

use_readline=self.has_readline,

AttributeError: PyDevTerminalInteractiveShell object has no attribute has_readline

Process finished with exit code 1

Couldnt connect to console process.


你好!

很有可能你安裝了較高版本的ipython。比如ipython5.0.0

請嘗試:

pip uninstall ipython

pip install ipython==4.2.0

希望能幫到你


在這裡你可以取消使用ipython 就可以了,或者著降低版本。默認是勾選的,當然第一個答案也是可以的,或者升級pycharm到最高版本。

降低ipython方法:

pip uninstall ipython
pip install ipython==4.2.0

最新的pycharm已經到了2017版,升級到2016.3版就可以支持ipython5.0以上版本

如果你的python版本是2那麼建議你使用4.2版本的ipython.


參照:Pycharm 的python console 啟動#x27;PyDevTerminalInteractiveShell#x27; object has no attribute #x27;has_readline#x27; 和 #x27;PyDevTerminalInteractiveShell#x27; object has no attribute #x27;has_readline#x27; 。我們可以將 將文件pydev_ipython_console_011.py放入或替換到
&/helpers/pydev/_pydev_bundle/ 或者:

&/helpers/pydev/ (PyCharm5)


推薦閱讀:

Ubuntu11.04中如何將pycharm添加到系統的「應用程序」菜單里 (pycharm已成功安裝)
pycharm 如何調整字體大小?
pycharm安裝numpy報錯,怎麼辦?
pycharm為什麼把py文件當成text文件?代碼提示都沒了!!?

TAG:Python | PyCharm |