You are not logged in.

#1 2017-05-15 14:45:52

Eregus
Member
Registered: 2013-04-02
Posts: 20

IPython2 doesn't start: no backports.shutil_get_terminal_size

Hello

When I try to run ipython2 I get this error:

Traceback (most recent call last):
  File "/usr/bin/ipython2", line 4, 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 25, 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 128, in <module>
    from IPython.utils.terminal import get_terminal_size
  File "/usr/lib/python2.7/site-packages/IPython/utils/terminal.py", line 22, in <module>
    from backports.shutil_get_terminal_size import get_terminal_size as _get_terminal_size
ImportError: No module named backports.shutil_get_terminal_size

The issue occurs even though I have backports.shutil_get_terminal_size package installed (it's ipython2's dependency). Any idea how can I fix it?

Offline

#2 2017-05-15 15:20:44

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,789

Re: IPython2 doesn't start: no backports.shutil_get_terminal_size

FYI, it works here.   Is your system fully up to date?


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#3 2017-05-15 21:36:08

Eregus
Member
Registered: 2013-04-02
Posts: 20

Re: IPython2 doesn't start: no backports.shutil_get_terminal_size

ewaller wrote:

FYI, it works here.   Is your system fully up to date?

Yes, it is. Could it be something with ipython2 package? It's flagged out of date.

Offline

#4 2017-05-15 22:04:48

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,789

Re: IPython2 doesn't start: no backports.shutil_get_terminal_size

I am running the latest.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#5 2017-06-15 13:53:36

mvdnes
Member
Registered: 2016-11-12
Posts: 5

Re: IPython2 doesn't start: no backports.shutil_get_terminal_size

After some investigation I noticed the file /usr/lib/python2.7/site-packages/backports/__init__.py was missing on my system.
Running pkgfile I saw that it belonged to python2-backports.

Reinstalling the python2-backports package made everything work again.

Offline

#6 2017-06-29 19:47:57

Eregus
Member
Registered: 2013-04-02
Posts: 20

Re: IPython2 doesn't start: no backports.shutil_get_terminal_size

mvdnes wrote:

After some investigation I noticed the file /usr/lib/python2.7/site-packages/backports/__init__.py was missing on my system.
Running pkgfile I saw that it belonged to python2-backports.

Reinstalling the python2-backports package made everything work again.

Thank you, now it works! I didn't even believe someone would have the same problem!

Offline

#7 2017-08-19 05:00:46

netrunegec
Member
Registered: 2017-08-19
Posts: 1

Re: IPython2 doesn't start: no backports.shutil_get_terminal_size

The solution mvdnes was not working for me.
I just did this:
pip install pip -U
pip uninstall ipython
pip install ipython

I found the solution the no backports.shutil_get_terminal_size here

Offline

Board footer

Powered by FluxBB