-
Operating system: Ubuntu16.04
-
Version of Python installed: Python 2.7.12
-
Installed IPython version: IPython 5.1.0
-
Error message:
650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M00/87/34/wKiom1fXiqKSp_ihAAESjJmCnnQ420.png-wh_500x0-wm_3 -wmp_4-s_386108842.png "title=" error message "alt=" Wkiom1fxiqksp_ihaaesjjmcnnq420.png-wh_50 "/>
1, the error message is displayed in the/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
Error
2, sudo vim erminal.py open this script;
3. Change the code snippet to the following error:
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/87/34/wKiom1fXjAazCe8zAABvZYZjBhU071.png "title=" code. png "alt=" Wkiom1fxjaazce8zaabvzyzjbhu071.png "/>
Note: The Python2 should be started using Get_terminal_size in the module shutil_backports;
Additional Reference questions
Http://stackoverflow.com/questions/37232446/ipython-console-cant-locate-backports-shutil-get-terminal-size-and-wont-load
This article is from the "Xu Big Tree" blog, please be sure to keep this source http://abelxu.blog.51cto.com/9909959/1852263
Install Ipython Error "Importerror:no module named Shutil_get_terminal_size"