I created a fresh conda environment for using scikit-learn and used
conda install <package>
to install scikit-learn
, jupyter
, pandas
, etc. for compatible dependencies..
I checked if sklearn
was working after loading the environment:
$python
Python 3.7.4 (default, Aug 13 2019, 15:17:50)
[Clang 4.0.1 (tags/RELEASE_401/final)] :: Anaconda, Inc. on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sklearn
>>>
Since import
command didn't throw errors, sklearn
is ready for use. However, I am getting a ModuleNotFoundError
while trying to import it in a jupyter notebook, that I am running from the same environment.
import sklearn
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-1-b7c74cbf5af0> in <module>()
----> 1 import sklearn
ModuleNotFoundError: No module named 'sklearn'
I was able to import numpy
and pandas
in the same notebook without any errors.
Please help me understand the problem and how to troubleshoot it.