JohnMarvin
JohnMarvin

Reputation: 121

Jupyter Notebook and pip referring to previous uninstalled python version

I have recently uninstalled python 3.7 and installed python 3.9. After that, when I try to use pip to install any package, it keeps trying to use python37.exe, which is not installed anymore. I was able to solve that by using python -m pip install, but the same does not work when I try to launch jupyter notebook, which still tries to use python37. I cannot launch it using a similar command python -m jupyter notebook.

I was wondering if there is any solution to this, since I could not find anything related to that.

Thanks in advance.

Upvotes: 1

Views: 1887

Answers (3)

JohnMarvin
JohnMarvin

Reputation: 121

Just to give you all an update in case anyone is facing the same problem.

I was able to find some remaining files and files of the previous installation of Python 3.7 in my system that were not deleted for some reason during the uninstall process. I deleted them manually and my system started to recognize Python 3.9 to call pip and jupyter after that.

Upvotes: 1

Yaakov Bressler
Yaakov Bressler

Reputation: 12138

This usually occurs when jupyter is installed with a specific version of python. The easiest / best solution is to uninstall jupyter, then reinstall it with the correct version of python.

In your case, you should consider using python3.9 -m pip install jupyter (after first uninstalling jupyter).

Upvotes: 0

Martin Stagl
Martin Stagl

Reputation: 56

Maybe try to install it again using your new pip like

pip install notebook

(Sorry not enough reputation for a comment)

Upvotes: 1

Related Questions