amueller / introduction_to_ml_with_python

Notebooks and code for the book "Introduction to Machine Learning with Python"
7.45k stars 4.57k forks source link

AttributeError: module 'mglearn' has no attribute 'plot_helpers' #154

Closed baqwas closed 3 years ago

baqwas commented 3 years ago

Hello!

After cloning the repository, I ran the first line in the notebook, 01-introduction.ipyng, and encountered the following error message: AttributeError: module 'mglearn' has no attribute 'plot_helpers'

Is this an operator/user self-inflicted error?

Thanks.

My platform information (derived from the code in the notebook a few lines later) is:

Python version: 3.9.5 (default, May 11 2021, 08:20:37) 
[GCC 10.3.0]
pandas version: 1.2.4
matplotlib version: 3.4.1
NumPy version: 1.19.5
SciPy version: 1.6.3
IPython version: 7.23.1
scikit-learn version: 0.24.2
graphviz version: 0.17
baqwas commented 3 years ago

Operator error presumably. I ran _./mglearn/plothelpers.py autonomously and then re-ran the original notebook, 01-introduction.ipyng. Everything worked as documented. Sorry for the false alarm.

Kind regards.

amueller commented 3 years ago

Glad it worked out in the end :)

imkhali commented 2 years ago

Hello! I am having the same exact error, I don't know what is wrong. I did not get how @baqwas solved the problem.

wanghedy commented 2 years ago

您的邮件已收到,我将会尽快处理,谢谢。王宇凝

baqwas commented 2 years ago

@imkhali

I ran ./mglearn/plot_helpers.py. I have not visited this topic recently but will be willing to assist to help you further if you wish. Thanks.

Kind regards.

BlackLutos commented 2 years ago

I add from mglearn import plot_helpers. And I revised cycler('color', mglearn.plot_helpers.cm_cycle.colors) to cycler('color', plot_helpers.cm_cycle.colors).

Kind regards.