@Phelps, Ronald (Ron) (CIV) I think you need to install the same using pip magic command i.e using % inside a notebook. Here is a screen shot where the same works after installing using magic command.
Please check if this works for you. Thanks!!
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I created a new compute based on an earlier one from Dec 2023.
Dec 23 compute has Python3.8
New compute has Python3.8 and Python3.9.
Azure notebook uses Python 3.9.19
From command line "import sklearn" works for 3.8 and 3.9
Azure notebook can't import - No module named 'sklearn'
Kernel selected is "Python3.8 Pytorch and Tensorflow" in notebook
Don't have a fix for this. Suggestions?
@Phelps, Ronald (Ron) (CIV) I think you need to install the same using pip magic command i.e using % inside a notebook. Here is a screen shot where the same works after installing using magic command.
Please check if this works for you. Thanks!!
It seems like the issue is that the required libraries are not installed in the Azure Notebook environment. Instead of using !pip install...
to install packages in Azure ML notebooks, you can use %pip
line magic within a notebook or install from a terminal. Here are the steps to install the sklearn
package from a terminal:
conda activate azureml_py38
pip install --upgrade scikit-learn
This should install the sklearn
package and allow you to import it in your notebook.
References: