I used to work with python version 3.9 in Jupyter lab. When I tried to install skrub, an extension of sk-learn, it appeared that I needed a version greater than 3.10. So, I installed the lastest python version, i.e 3.12.
Once in Jupyter, I checked the version using ! python --version. It confirmed I was in Python 3.12.2. All fine.
Then, I installed skrub also from Jupyter using !pip install skrub.
Again, all went fine, and I got confirmations that skrub, scikit-learn, numpy, scipy, pandas, ... were successfully installed in folder c:\users\JCF\appdata\local\programs\python\python312\lib\site-packages
All fine, no error or warning.
Now, in the same notebook, practically on the next cell, I enter the command
from skrub import TableVectorizer.
I then get a message:
ModuleNotFoundError: No module named 'skrub'
Based on other questions asked here, I understand that this is related to windows paths. Now, it's more about the next step. What would be the recommended approach from this point to get a fully working version in 3.12? Should I completely remove version 3.9?
Note:
Using the magic command (as recommended by Wayne), I get the same message before upgrading from version 3.9. The messages I get are the following:
ERROR: Ignored the following versions that require a different python version: 0.1.0 Requires-Python >=3.10
ERROR: Could not find a version that satisfies the requirement skrub (from versions: none)
ERROR: No matching distribution found for skrub
I believe there was an internal mix related to the paths of the two versions. I finally uninstalled version 9 completely. Then, as I was one version late for Jupyter lab, I decided to upgrade Jupyter right after. All went nicely and everything is working fine with the new versions.
Finally, the approach I feared the most was the easiest and most straightforward. All the scripts I wrote using former versions of python, pandas, sk-learn work nicely.