AttributeError: module 'chart_studio' has no attribute 'tools'

I am new to chart_studio and am trying to log in to my credentials via Python whilst following the getting started tutorial that Plotly provides.

I have uninstalled and reinstalled chart_studio across both pip and conda however when attempting to set credentials get the following error:

AttributeError: module ‘chart_studio’ has no attribute ‘tools’

My code is:

import chart_studio'sssccc111', api_key='yFe9FliEVe5Zy5C9kCyK')

I solved this problem by pip uninstall chart_sutdio and pip install chart_studio.
I don’t know why, but it worked for me.