2016-12-28 103 views
1

請問,你能幫忙嗎?我無法獲得PyCharm啓動的python控制檯。玩過所有可用的選項,並通過文檔瀏覽過,但無法弄清楚這一點。任何幫助,將不勝感激。請找出錯誤我在控制檯中看到下面......Python 3.3.5控制檯無法在PyCharm 2016.3.1中啓動

OS:贏10

C:\Miniconda3\python.exe "C:\Program Files (x86)\JetBrains\PyCharm\helpers\pydev\pydevconsole.py" 64331 64332 
Traceback (most recent call last): 
    File "C:\Miniconda3\lib\site-packages\traitlets\traitlets.py", line 526, in get 
    value = obj._trait_values[self.name] 
KeyError: None 
During handling of the above exception, another exception occurred: 
Traceback (most recent call last): 
    File "C:\Program Files (x86)\JetBrains\PyCharm\helpers\pydev\pydevconsole.py", line 526, in <module> 
    pydevconsole.start_server(pydev_localhost.get_localhost(), int(port), int(client_port)) 
    File "C:\Program Files (x86)\JetBrains\PyCharm\helpers\pydev\pydevconsole.py", line 355, in start_server 
    interpreter = InterpreterInterface(host, client_port, threading.currentThread()) 
    File "C:\Program Files (x86)\JetBrains\PyCharm\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 "C:\Program Files (x86)\JetBrains\PyCharm\helpers\pydev\_pydev_bundle\pydev_ipython_console_011.py", line 488, in get_pydev_frontend 
    _PyDevFrontEndContainer._instance = _PyDevFrontEnd(show_banner=show_banner) 
    File "C:\Program Files (x86)\JetBrains\PyCharm\helpers\pydev\_pydev_bundle\pydev_ipython_console_011.py", line 318, in __init__ 
    self.ipython = PyDevTerminalInteractiveShell.instance() 
    File "C:\Miniconda3\lib\site-packages\IPython\config\configurable.py", line 337, in instance 
    inst = cls(*args, **kwargs) 
    File "C:\Miniconda3\lib\site-packages\IPython\core\interactiveshell.py", line 512, in __init__ 
    self.init_readline() 
    File "C:\Miniconda3\lib\site-packages\IPython\core\interactiveshell.py", line 1911, in init_readline 
    if self.readline_use: 
    File "C:\Miniconda3\lib\site-packages\traitlets\traitlets.py", line 554, in __get__ 
    return self.get(obj, cls) 
    File "C:\Miniconda3\lib\site-packages\traitlets\traitlets.py", line 532, in get 
    % (self.name, obj)) 
traitlets.traitlets.TraitError: No default value found for None trait of <_pydev_bundle.pydev_ipython_console_011.PyDevTerminalInteractiveShell object at 0x00000000042CFBA8> 
Process finished with exit code 1 
+0

,你想什麼碼跑步?你有沒有試過這個簡單的'print(「Hello world」)' – MarkyPython

+0

謝謝,@MarkyPython ...我無法在控制檯中運行任何代碼...雖然IDE工作正常,並且我配置了與項目相同的解釋器... –

+0

你是如何運行代碼的?嘗試去運行 - >運行「[項目名稱]」 – MarkyPython

回答

1

好了,經過反覆擺弄一下: 解釋更改爲一個不同的版本(Python的3.5.x的)做這個工作。這讓我懷疑IPython是否是這個問題..它確實是!

問題是IPython for Python 3.3.5不能與PyCharm一起使用。 IPython Version 5由PyCharm安裝,但不適用於Python 3.3.5。

我刪除IPython中使用「康達卸載」,然後「康達乾淨」並重新啓動控制檯,然後它的工作就像一個魅力...

本質: 1.退出Pycharm 2.拆下IPython的 - 使用'Conda刪除/卸載'然後'conda clean'徹底擺脫它。 3.重新啓動Pycharm,並允許它重新導入所有'骨架' 4.重新啓動控制檯。

+0

找到解決方案並在將來爲其他人提供答案的工作非常出色。 – MarkyPython

0

我有一個類似的問題在Fedora 24。出於某種原因,Fedora的船舶仍然3.X的IPython:/我只是用pip3 install ipython --upgrade裏面裝的IPython 6.0.0升級它和它的作品:d