Black Lives Matter. Please consider donating to Black Girls Code today.

Running plotly in windows outside IDE (PyCharm)


I’m new to Plotly so please bear with me as this may get a bit long winded whilst trying to explain myself.

I’m using the free version of Plotly and and have created a simple scatter plot and it works a treat. I can execute it using PyCharm (community) within the application and it runs as expected. The script executes; the browser opens up a new tab; and the interactive graph gets displayed.

This script is saved in PyCharm’s workspace under the filename ‘’.

However, when I launch the Windows command prompt and type (python directory in path) ‘python’, I get the error:
Traceback (most recent call last):
File “”, line 1, in
import plotly
ImportError: No module named plotly

I’m using Python 3.6.1

I’m not sure why it can’t see the plotly library when I run the script outside the IDE? Can I hard code a path to this library? Not sure how to deal with this.

Many thanks,

Problem solved. My girlfriend fixed it :slight_smile: Turns out I just need to re-install plotly. Cheers.