Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ImportError: No module named shutil_get_terminal_size IPython

Tags:

ipython

I am having this error with my IPython version on Redhat.

$ ipython --version

Traceback (most recent call last):

  File "/usr/bin/ipython", line 7, in <module>
    from IPython import start_ipython

  File "/usr/lib/python2.7/site-packages/IPython/__init__.py", line 48, in module

    from .core.application import Application
  File "/usr/lib/python2.7/site-packages/IPython/core/application.py", line 24, in <module>

   from IPython.core import release, crashhandler
  File "/usr/lib/python2.7/site-packages/IPython/core/crashhandler.py", line 28, in module

    from IPython.core import ultratb
  File "/usr/lib/python2.7/site-packages/IPython/core/ultratb.py", line 121, in module

    from IPython.utils.terminal import get_terminal_size
  File "/usr/lib/python2.7/site-packages/IPython/utils/terminal.py", line 27, in module

    import backports.shutil_get_terminal_size
**ImportError: No module named shutil_get_terminal_size**

Could you please help me to resolve it?

like image 780
Majid Avatar asked Jun 09 '16 19:06

Majid


2 Answers

According to this question, try:

conda config --add channels conda-forge
conda install backports.shutil_get_terminal_size
like image 120
mehrtash Avatar answered Sep 29 '22 13:09

mehrtash


I got the same question as yours. I solve it by using pip install -U ipython to update IPython and it workes. Hope it helps!

like image 24
sike Avatar answered Sep 29 '22 15:09

sike