unable to open ipython
Title
Question
I am taken course from swayam of python. I have installed ipython 5.1.0 successfully, but unable to open ipython and getting below message. tried command ipython3 & ipython, but in both commands getting the same error as mentioned below. Please help to resolve.
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "C:\Users\intim\AppData\Roaming\Python\Python313\Scripts\ipython.exe\__main__.py", line 4, in <module>
from IPython import start_ipython
File "C:\Users\intim\AppData\Roaming\Python\Python313\site-packages\IPython\__init__.py", line 49, in <module>
from .terminal.embed import embed
File "C:\Users\intim\AppData\Roaming\Python\Python313\site-packages\IPython\terminal\embed.py", line 18, in <module>
from IPython.terminal.ipapp import load_default_config
File "C:\Users\intim\AppData\Roaming\Python\Python313\site-packages\IPython\terminal\ipapp.py", line 30, in <module>
from IPython.core.magics import ScriptMagics
File "C:\Users\intim\AppData\Roaming\Python\Python313\site-packages\IPython\core\magics\__init__.py", line 21, in <module>
from .execution import ExecutionMagics
File "C:\Users\intim\AppData\Roaming\Python\Python313\site-packages\IPython\core\magics\execution.py", line 44, in <module>
from IPython.utils.module_paths import find_mod
File "C:\Users\intim\AppData\Roaming\Python\Python313\site-packages\IPython\utils\module_paths.py", line 29, in <module>
import imp
ModuleNotFoundError: No module named 'imp'
Python-3.4.3 Getting-started-with-IPython 00-01 min 0-10 sec
Answers:
Assignment-1
1. Commands starting with ab:
abs
2. Commands starting with a:
abs
all
any
ascii
Assignment-2
round() documentation (usage):
round(number, digits)
number → value to be rounded
digits (optional) → number of decimal places
Assignment-3
Outputs:
a) round(2.48) → 2
b) round(2.48, 1) → 2.5
c) round(2.484) → 2
d) round(2.484, 2) → 2.48
Assignment-4
1. Typing round(2.484 and pressing Enter → SyntaxError (parenthesis not closed)
2. Cancel using → Ctrl + C
3. round(2.484, 2) → 2.48
Assignment-5
1. False
2. Ctrl + D
3. Question mark (?)

Login to add comment