2. Testing your Installation
Testing your Python environment
- Download the file plotly_test.py to your Downloads folder.
- Open a command prompt (Windows - press the Windows key, type
cmd.exe, and press Enter; Macs - Hold the “command” key, press the space bar, typeTerminal, and press return). - Type
cd ~/Downloadsand press enter. - Run the
plotly_test.pyscript (Windows - typepython.exe plotly_test.pyand press Enter; Macs - typepython3 plotly_test.pyand press return). - 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.pngcontaining the same plot should appear in your Downloads folder.1 If both of these things happen, then your installation works fine.
-
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 typeplotly_get_chromeinto this same command line and go back to step 6.4 above, and things should work now. ↩︎