2. Testing your Installation

Testing your Python environment

  1. Download the file plotly_test.py to your Downloads folder.
  2. Open a command prompt (Windows - press the Windows key, type cmd.exe, and press Enter; Macs - Hold the “command” key, press the space bar, type Terminal, and press return).
  3. Type cd ~/Downloads and press enter.
  4. Run the plotly_test.py script (Windows - type python.exe plotly_test.py and press Enter; Macs - type python3 plotly_test.py and press return).
  5. After a few seconds, two things should happen: 1.) you should see a browser window open with a plot of a sine wave it it; 2.) a new file image named test.png containing the same plot should appear in your Downloads folder.1 If both of these things happen, then your installation works fine.

  1. Sometimes, the image file will not be generated, often coinciding with a message in the command line to run plotly_get_chrome. You can usually simply type plotly_get_chrome into this same command line and go back to step 6.4 above, and things should work now. ↩︎