Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ImportError: No module named IPython

When i try to use from IPython.display import clear_output, display_html, then i show the error:

Error Image
(ImportError: No module named IPython)

I am using Python 2.7.13, and im trying to make the game of life from John Conway. I am following this link: http://nbviewer.jupyter.org/url/norvig.com/ipython/Life.ipynb

I have read another questions and answers about it, but any answer works for me. First, this error is showed in command line, and when i try to run this code in a file. Second, this error is direct to IPython, not submodule or something similiar.

like image 204
Jhonatan Avatar asked Jul 19 '17 02:07

Jhonatan


4 Answers

Ok, finally i achieved my goal.

  1. I wrote ipython --version but i found, it was not installed.
  2. I tried to install it, with pip. I went to C:\Python27\Scripts, here is pip, you can try in this directory, or add to environment variables.
  3. I tried to install ipython, but i found a error

error: Unable to find vcvarsall.bat

so i installed visual studio c++ 9.0, the version to python 2.7.

  1. pip install ipython
like image 131
Jhonatan Avatar answered Oct 22 '22 14:10

Jhonatan


For Anaconda try,

conda install -c anaconda ipython
like image 32
Shital Shah Avatar answered Oct 22 '22 15:10

Shital Shah


If you scrolled this far you may want to try:

import IPython

as opposed to import Ipython. Notice that 2 letters are capitalized

like image 15
Wilmer E. Henao Avatar answered Oct 22 '22 13:10

Wilmer E. Henao


Use this code to install the IPython library:

!pip install ipython
import IPython

Well, this works on Google Colab.

like image 8
Anamitra Musib Avatar answered Oct 22 '22 15:10

Anamitra Musib