GPT-4 Code Interpreter – How to Run Python & Plot Data in ChatGPT

5/5 - (5 votes)

GPT-4 now provides a friendly little tool that has the potential to completely change the coding industry. Again.

You can activate the code interpreter in your ChatGPT Settings:

Toggle the “Code Interpreter” option (currently in “Beta features” but not for long):

Now you can run the code interpreter using a simple natural language prompt such as "Create a histogram of points drawn from a random distribution in Python and visualize the result".

Here’s an example run in my ChatGPT environment:

Yay you can now run Python code and plot scripts in your ChatGPT environment!

If you click on the “Show work” button above, it toggles the code that was executed:

A simple feature but powerful — using ChatGPT has now become even more convincing for coders like you and me.

Also make sure to check out our prompting tricks:

👩‍💻 Recommended: Best 35 Helpful ChatGPT Prompts for Coders (2023)