# Problem with importing a module in Jupyter

**URL:** <https://forum.codewithmosh.com/t/problem-with-importing-a-module-in-jupyter/4953>\
**Category:** Python\
**Created:** [May 17, 2021, 9:35pm UTC](https://forum.codewithmosh.com/t/problem-with-importing-a-module-in-jupyter/4953 "2021-05-17T21:35:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![BertR280](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/bertr280/32/1613_2.png) [@BertR280](https://forum.codewithmosh.com/u/BertR280)\
**Post date:** [May 17, 2021, 9:35pm UTC](https://forum.codewithmosh.com/t/problem-with-importing-a-module-in-jupyter/4953/1 "2021-05-17T21:35:33Z")

</div>

Having trouble with Machine Learning - Persisting Models lecture…

> ImportError Traceback (most recent call last)  
> in   
> 3 from sklearn.model\_selection import train\_test\_split  
> 4 from sklearn.metrics import accuracy\_score  
> ----\> 5 from sklearn.externals import joblib  
> 6  
> 7 music\_data = pd.read\_csv(‘music.csv’)
> 
> ImportError: cannot import name ‘joblib’ from ‘sklearn.externals’ (/opt/anaconda3/lib/python3.8/site-packages/sklearn/externals/ **init**.py)

---

<div class="post-metadata">

**Author:** ![BertR280](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/bertr280/32/1613_2.png) [@BertR280](https://forum.codewithmosh.com/u/BertR280)\
**Post date:** [May 18, 2021, 2:06pm UTC](https://forum.codewithmosh.com/t/problem-with-importing-a-module-in-jupyter/4953/2 "2021-05-18T14:06:36Z")

</div>

Fixed. Changed “from sklearn.externals import joblib” to simply “import joblib” and it worked.
