IPython console can't locate “backports.shutil_get_terminal_size” and won't load

后端 未结 7 1772
别那么骄傲
别那么骄傲 2020-12-24 03:21

I\'m running Python2.7 on windows 10 doing env and most pkg management with Anaconda. After upgrading a number of packages, my ipython console now fails to start in any IDE

7条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-24 03:35

    I am on CentOS 7, and I needed to change my terminal.py as shown below.

    On the import statements I messed around with the prefixes and got it to work -

    import os
    import sys
    import warnings
    try:
      from backports import get_terminal_size as _get_terminal_size
    except ImportError:
      # use backport on Python 2
      from shutil_backports import get_terminal_size as _get_terminal_size
    

提交回复
热议问题