I am trying to import scikit-learn version 1.1.2 from my environment, however it imports another version (0.24.2) when I try.
The code is below:
import sklearn
print(sklearn.__version__)
-------
output: 0.24.2
I checked my environment from both pip commands and site-packages. I have the 1.1.2 version of scikit-learn. Tried to uninstall and install it again, doesn't work. When 1.1.2 version is not installed, python still imports 0.24.2 version from somewhere else I think.
How to import 1.1.2 version, and delete 0.24.2 version if I don't need it?
Also, how will I know if I need that 0.24.2 version?
I restarted my kernel and it is fixed. Now, I can import 1.1.2 version. I should have probably restart my kernel if I installed any libraries.