Conda:改变Python版本。不寻常的追溯

时间:2017-05-28 17:29:47

标签: python ipython conda

尝试将python版本从3.6更改为3.4以与tensorflow一起使用。我使用了conda包管理器。我输入了

conda install python=3.4.0

当我尝试使用ipython时,我在输入第一个import语句时得到了这个奇怪的回溯:

     File "C:\Program Files\Anaconda3\lib\site-packages\prompt_toolkit\interface.py", line 394, in run
    self.eventloop.run(self.input, self.create_eventloop_callbacks())
  File "C:\Program Files\Anaconda3\lib\site-packages\prompt_toolkit\eventloop\win32.py", line 87, in run
    self._process_queued_calls_from_executor()
  File "C:\Program Files\Anaconda3\lib\site-packages\prompt_toolkit\eventloop\win32.py", line 147, in _process_queued_calls_from_executor
    c()
  File "C:\Program Files\Anaconda3\lib\site-packages\prompt_toolkit\interface.py", line 326, in redraw
    self._redraw()
  File "C:\Program Files\Anaconda3\lib\site-packages\prompt_toolkit\interface.py", line 351, in _redraw
    self.renderer.render(self, self.layout, is_done=self.is_done)
  File "C:\Program Files\Anaconda3\lib\site-packages\prompt_toolkit\renderer.py", line 442, in render
    previous_width=(self._last_size.columns if self._last_size else 0))
  File "C:\Program Files\Anaconda3\lib\site-packages\prompt_toolkit\renderer.py", line 153, in _output_screen_diff
    current_pos = move_cursor(Point(y=y, x=c))
  File "C:\Program Files\Anaconda3\lib\site-packages\prompt_toolkit\renderer.py", line 90, in move_cursor
    _output_cursor_backward(current_x - new.x)
  File "C:\Program Files\Anaconda3\lib\site-packages\prompt_toolkit\terminal\win32_output.py", line 256, in cursor_backward
    self.cursor_forward(-amount)
  File "C:\Program Files\Anaconda3\lib\site-packages\prompt_toolkit\terminal\win32_output.py", line 249, in cursor_forward
    sr = self.get_win32_screen_buffer_info().dwCursorPosition
  File "C:\Program Files\Anaconda3\lib\site-packages\prompt_toolkit\terminal\win32_output.py", line 150, in get_win32_screen_buffer_info
    raise NoConsoleScreenBufferError
prompt_toolkit.terminal.win32_output.NoConsoleScreenBufferError: No Windows console found. Are you running cmd.exe?

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Program Files\Anaconda3\Scripts\ipython-script.py", line 5, in <module>
    sys.exit(IPython.start_ipython())
  File "C:\Program Files\Anaconda3\lib\site-packages\IPython\__init__.py", line 119, in start_ipython
    return launch_new_instance(argv=argv, **kwargs)
  File "C:\Program Files\Anaconda3\lib\site-packages\traitlets\config\application.py", line 658, in launch_instance
    app.start()
  File "C:\Program Files\Anaconda3\lib\site-packages\IPython\terminal\ipapp.py", line 348, in start
    self.shell.mainloop()
  File "C:\Program Files\Anaconda3\lib\site-packages\IPython\terminal\interactiveshell.py", line 440, in mainloop
    self.interact()
  File "C:\Program Files\Anaconda3\lib\site-packages\IPython\terminal\interactiveshell.py", line 423, in interact
    code = self.prompt_for_code()
  File "C:\Program Files\Anaconda3\lib\site-packages\IPython\terminal\interactiveshell.py", line 333, in prompt_for_code
    pre_run=self.pre_prompt, reset_current_buffer=True)
  File "C:\Program Files\Anaconda3\lib\site-packages\prompt_toolkit\interface.py", line 404, in run
    self._redraw()
  File "C:\Program Files\Anaconda3\lib\site-packages\prompt_toolkit\interface.py", line 351, in _redraw
    self.renderer.render(self, self.layout, is_done=self.is_done)
  File "C:\Program Files\Anaconda3\lib\site-packages\prompt_toolkit\renderer.py", line 442, in render
    previous_width=(self._last_size.columns if self._last_size else 0))
  File "C:\Program Files\Anaconda3\lib\site-packages\prompt_toolkit\renderer.py", line 119, in _output_screen_diff
    current_pos = move_cursor(Point(0, 0))
  File "C:\Program Files\Anaconda3\lib\site-packages\prompt_toolkit\renderer.py", line 90, in move_cursor
    _output_cursor_backward(current_x - new.x)
  File "C:\Program Files\Anaconda3\lib\site-packages\prompt_toolkit\terminal\win32_output.py", line 256, in cursor_backward
    self.cursor_forward(-amount)
  File "C:\Program Files\Anaconda3\lib\site-packages\prompt_toolkit\terminal\win32_output.py", line 249, in cursor_forward
    sr = self.get_win32_screen_buffer_info().dwCursorPosition
  File "C:\Program Files\Anaconda3\lib\site-packages\prompt_toolkit\terminal\win32_output.py", line 150, in get_win32_screen_buffer_info
    raise NoConsoleScreenBufferError
prompt_toolkit.terminal.win32_output.NoConsoleScreenBufferError: No Windows console found. Are you running cmd.exe?

If you suspect this is an IPython bug, please report it at:
    https://github.com/ipython/ipython/issues
or send an email to the mailing list at ipython-dev@scipy.org

You can print a more detailed traceback right now with "%tb", or use "%debug"
to interactively debug it.

Extra-detailed tracebacks for bug-reporting purposes can be enabled via:
    %config Application.verbose_crash=True

无法做出正面或反面。任何帮助表示赞赏。

0 个答案:

没有答案