Hello
I recently performed a clean install of Anaconda (latest version, Python 3.11) & created a new Conda environment for a machine learning project. After installing
scikit-learn
using conda install scikit-learn
; the installation completes without errors.
However; when I try to run import sklearn
in a Jupyter Notebook or Python script inside that environment; I get a ModuleNotFoundError: No module named 'sklearn'
.
I have checked the environment with conda list
, & scikit-learn
does appear to be installed. I have also tried reinstalling the package and even using pip install scikit-learn
as a fallback but the issue persists. Interestingly; other packages like NumPy and pandas import fine, suggesting this might be a path / environment activation issue specific to
sklearn
.
Checked Environments - Anaconda documentation guide related to this and found it quite informative. As I explore various tools in the data science ecosystem including learning what is alteryx;I want to ensure foundational libraries like scikit-learn
work reliably within clean Conda environments.
Has anyone else faced a similar problem where only specific packages like sklearn
are inaccessible in an otherwise functioning Conda environment? Could there be a conflict between Conda & pip installations / is there an issue with scikit-learn compatibility on Python 3.11?
Thank you !!