ipython报错"ImportError: No module named shutil_get_terminal_size"

原文地址: http://abelxu.blog.51cto.com/9909959/1852263

报错信息:

ipython报错
Paste_Image.png

解决办法:

1、报错信息显示在 /usr/local/lib/python2.7/dist-packages/IPython/utils/terminal.py 的

from backports.shutil_get_terminal_size import get_terminal_size as _get_terminal_size

出错;
2、sudo vim erminal.py 打开此脚本;
3、将出错的代码段修改如下:

ipython报错
Paste_Image.png

备注:Python2的启动应该使用get_terminal_size在模块shutil_backports中;
另参考问题
http://stackoverflow.com/questions/37232446/ipython-console-cant-locate-backports-shutil-get-terminal-size-and-wont-load

你可能感兴趣的:(ipython报错"ImportError: No module named shutil_get_terminal_size")