Reputation: 35
I have tried to put this script in the sitecustomize.py
file, to be able to see colored error messages in visual studio code.
the script:
import sys
from IPython.core.ultratb import ColorTB
sys.excepthook = ColorTB()
I got the error message above even though I have used pip
to install ipython
.
EDIT:
I tried to use coloredlogs
instead of ipython
and it showed me the same message again
Upvotes: 0
Views: 2855
Reputation: 35
I needed to reinstall python on my computer. there were multiple versions of it, and because of that there were multiple versions of pip
Upvotes: 0
Reputation: 10344
Please use the command "pip show ipython
" to check the installation location of the module:
(If it does not display the location of the module, it means that the terminal used environment is inconsistent with the selected one.)
Then find the folder of the module in this python environment, try to delete it, and then reinstall it:
Run:
Upvotes: 0
Reputation: 2370
The IPython
module only works inside iPython, not inside any other IDE/Shell/etc.
Upvotes: 1