Python on a Chromebook: run it in the browser, no install

A Chromebook runs Chrome, and that is enough to run Python. Open the Python Playground, paste your code and press Run. There is nothing to install and no account to create.

name = "Chromebook"
for n in range(1, 4):
    print(f"Hello from Python on a {name}, run {n}")

Run it in the playground

Three ways to run Python on a Chromebook

  1. In the browser, on this site. Open the Python Playground and run your code. Nothing to install.
  2. With the Python Runner extension for Chrome. Run code from any page with a right-click, also without an internet connection.
  3. In Linux on the Chromebook. A full Python install with packages, files and a code editor of your choice. Setup can take 10 minutes or more.

Which Chromebook Python option to choose

  • To try a few lines, follow a lesson or do an exercise, use the playground in the browser.
  • To run code often, from any page, or with no internet connection, add the extension.
  • To install packages, keep projects in files or use an IDE, turn on Linux.

Run Python in the browser

The Python Playground runs Python 3.14 inside the Chrome tab. Python is downloaded once, then your code runs on the Chromebook itself and is not uploaded anywhere.

  • The standard library, numpy and pandas are available.
  • Scripts that call input() work: type the input lines into the Stdin field.
  • Save snippets in the browser or download your code as a .py file.
  • Other packages cannot be installed, and the playground needs an internet connection to open.

How to install Python on a Chromebook with Linux

ChromeOS has a Linux development environment. It is off by default, and you turn it on in Settings. Linux works on Chromebooks launched in 2019 and later and on many older models.

  1. At the bottom right, select the time, then Settings.
  2. Select About ChromeOS, then Developers.
  3. Next to "Linux development environment", select Set up and follow the instructions on the screen. Setup can take 10 minutes or more.

A Terminal window opens with Debian Linux. Check whether Python is already there:

python3 --version

If the command is not found, install Python with the APT package manager:

sudo apt update
sudo apt install python3

From there you can install code editors, IDEs and other tools the same way. All Linux apps share one sandbox: a harmful Linux app can affect other Linux apps, but not the rest of the Chromebook.

School and work Chromebooks

On a Chromebook from school or work, the administrator decides what you can use. Google's Chromebook Help says that on such a device you can't add extensions and might not be able to use Linux. Ask your administrator if you need them.

The playground is a website, so it needs neither. It works as long as the site is not blocked.

FAQ

Can you run Python on a Chromebook?

Yes. Run it in the browser on this site, with the Python Runner extension, or install it in the Linux development environment.

How do I install Python on a Chromebook?

Turn on Linux in Settings, About ChromeOS, Developers. Open the Terminal and run python3 --version. If Python is missing, install it with sudo apt install python3. To only run code, you do not need to install anything.

How to download Python on a Chromebook?

To run code you need no download: the playground runs Python in the browser. For a full install, use Linux and its package manager instead of an installer.

Is there a Python IDE for Chromebook?

In Linux you can install code editors and IDEs. For short programs the playground has an editor with Run and Stop, input() and saved snippets.

Does it work on a school Chromebook?

The playground is a website, so it works unless your school blocks it. Extensions and Linux depend on your administrator.

Can I use numpy and pandas?

In the playground, yes. Other packages need Linux.

Does it work without the internet?

The playground needs a connection to open. The Python Runner extension works offline.

Is my code uploaded?

No. The playground runs your code in the browser on your Chromebook. This site has no server that receives it.