This is a commmon question, but nothing worked for me so far. I have seen this answer too Python 3 on Mac : ModuleNotFoundError: No module named 'mglearn'
!pip install mglearn !pip install sklearn !pip install -U scikit-learn import mglearn import sklearn ModuleNotFoundError Traceback (most recent call last) <ipython-input-1-fe22f30497b9> in <module> ----> 1 import mglearn 2 import sklearn ModuleNotFoundError: No module named 'mglearn'
I checked other questions but failed to solve it. I have macOS Catalina 10.15.7
import sys !{sys.executable} -m pip install mglearn
Try using this. This assures that you are using the pip version associated with the environment.
2.1m questions
2.1m answers
60 comments
57.0k users