# "import plotly" fails after clean install

**URL:** <https://community.plotly.com/t/import-plotly-fails-after-clean-install/30353>\
**Category:** 📊 Plotly Python\
**Created:** [October 22, 2019, 5:46pm UTC](https://community.plotly.com/t/import-plotly-fails-after-clean-install/30353 "2019-10-22T17:46:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![maxhouck](https://avatars.discourse-cdn.com/v4/letter/m/e19adc/32.png) [@maxhouck](https://community.plotly.com/u/maxhouck)\
**Post date:** [October 22, 2019, 5:46pm UTC](https://community.plotly.com/t/import-plotly-fails-after-clean-install/30353/1 "2019-10-22T17:46:30Z")

</div>

I am on a Windows 10 computer, running python 3.7.5. After installing plotly using “python -m pip install plotly” I am unable to execture “import plotly”. It fails with the following message. If anyone knows why this doesn’t work on my default installation, please let me know.

C:\Users\HOM4FH\>python  
Python 3.7.5 (tags/v3.7.5:5c02a39a0b, Oct 15 2019, 00:11:34) [MSC v.1916 64 bit (AMD64)] on win32  
Type “help”, “copyright”, “credits” or “license” for more information.

> > > import plotly  
> > > Traceback (most recent call last):  
> > > File “”, line 1, in   
> > > File “C:\Users\HOM4FH\AppData\Local\Programs\Python\Python37\lib\site-packages\plotly\__init_\_.py”, line 30, in   
> > > from plotly import (  
> > > File “C:\Users\HOM4FH\AppData\Local\Programs\Python\Python37\lib\site-packages\plotly\graph\_objs\__init_\_.py”, line 92710, in   
> > > from .\_figurewidget import FigureWidget  
> > > File “C:\Users\HOM4FH\AppData\Local\Programs\Python\Python37\lib\site-packages\plotly\graph\_objs\_figurewidget.py”, line 1, in   
> > > from plotly.basewidget import BaseFigureWidget  
> > > File “C:\Users\HOM4FH\AppData\Local\Programs\Python\Python37\lib\site-packages\plotly\basewidget.py”, line 19, in   
> > > @widgets.register  
> > > AttributeError: module ‘ipywidgets’ has no attribute ‘register’

---

<div class="post-metadata">

**Author:** ![Alexboiboi](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/alexboiboi/32/6420_2.png) [@Alexboiboi](https://community.plotly.com/u/Alexboiboi)\
**Post date:** [October 23, 2019, 4:18pm UTC](https://community.plotly.com/t/import-plotly-fails-after-clean-install/30353/2 "2019-10-23T16:18:18Z")

</div>

Hi,  
what is your version of ipywidgets?

If I remember correctly, sould be 7.5

Alex-

---

<div class="post-metadata">

**Author:** ![maxhouck](https://avatars.discourse-cdn.com/v4/letter/m/e19adc/32.png) [@maxhouck](https://community.plotly.com/u/maxhouck)\
**Post date:** [October 25, 2019, 6:15pm UTC](https://community.plotly.com/t/import-plotly-fails-after-clean-install/30353/3 "2019-10-25T18:15:02Z")

</div>

This problem was solved after switching from Python 3.7.5 to 3.8. So probably a version incompatibility somewhere, but I believe this issue is already documented
