Question: I got this error “No module named IPython” while executing a Python program. The complete error message is below. Any idea of how to fix the same?
$ python san.py Traceback (most recent call last): File "san.py", line 2, in <module> from IPython import get_ipython ModuleNotFoundError: No module named 'IPython'
Solution: It means, the program is trying to reference ipython
library that’s not installed in the system. All you need is, install ipython
using pip
as shown below:
# pip install ipython [....] Requirement already satisfied: parso>=0.7.0 in /home/ubuntu/.conda/envs/iisc_dm/lib/python3.8/site-packages (from jedi>=0.10->ipython) (0.7.0) Installing collected packages: ipython Successfully installed ipython-7.14.0
# conda install -c anaconda ipython
That’s it! Learn more about Python installation errors and solutions. If you ever want to use different versions of Python, then it’s a good idea to create different Python environments.
it is not working
I was getting the error No module named IPython, after “pip install ipython” command the correct version of ipython installed and interpreter is working now. thank you….