Hi,
From the prompt, your python is version 3.8 and your ipython is based on 3.7. So they just point to two different implementations of python. And it seems that you have torchvision installed for the python 3.8 but not for the 3.7.
You can try to remove extra python installs to avoid such issues. Or use virtualenv that will make sure to have all of these consistent.