Is it possible to run the Python interpreter on a ChromeOS machine? I've found various editors you can use, but I would like the ability to run python applications as well.

I would like to purchase the Samsung Chromebook, and being a computer science student, I'd love to be able to do my CS homework on it instead of carrying around my 15 inch Macbook or Toshiba.

up vote 20 down vote accepted

Python Shell

You can install this plugin, Python Shell into Chrome. Here's some info from that extensions info page in the store:

Python shell for your browser.
A Python shell for Chrome.

Features:

  • Python 2.7
  • Ruby 1.8
  • JavaScript

These are the only languages that have been currently compiled to JavaScript by the jsrepl project as this time.

Developer Mode

Alternatively you can go put your device in Developer Mode and gain access to a shell from where you can install/launch Python.

Skulpt Interpreter

Lastly you can check out the Skulpt Interpreter. Main site's here.

Skulpt is an entirely in-browser implementation of Python.

Crouton

You can install a full fledged Linux on the Chromebook hardware using the project Crouton.

crouton is a set of scripts that bundle up into an easy-to-use, Chromium OS-centric chroot generator. Currently Ubuntu and Debian are supported (using debootstrap behind the scenes), but "Chromium OS Debian, Ubuntu, and Probably Other Distros Eventually Chroot Environment" doesn't acronymize as well (crodupodece is admittedly pretty fun to say, though).

There's a easy to follow tutorial on Life Hacker which walks you through the installation and setup, titled: How to Install Linux on a Chromebook and Unlock Its Full Potential.

Which way to go?

If you're serious about using the Chromebook hardware as a development box I would go with Crouton. The other options only give you pieces of Python. If you're serious about doing any real development this is really the only option.

  • So does crouton run with chromeos or do you have to launch it seperately. – RyanDawkins Jul 24 '13 at 13:18
  • @RyanDawkins - If you follow the Life Hacker guide you can run Crouton on top of ChromeOS in a chroot environment. en.wikipedia.org/wiki/Chroot. – slm Jul 24 '13 at 13:58
  • The Python Shell is now up to version 3.3. Plus you should add warnings about the side effects of running your Chromebook in developer mode. – Mark Ransom Sep 21 '17 at 13:22

A good alternative would be to use a cloud dev environment, such as Codevny or Cloud9.

These have many advantages over local file-based installations (as described in detail on their pages) and are more aligned with the whole concept of Chrome OS, i.e., the local device should be lean, cheap (but comfortable!) and potentially disposable (as in, if you spill a latte on it or someone steals it goodness forbid, you just get a new one and continue your work uninterruptibly).

They also offer competitive pricing for the kinds of workloads that a student needs (e.g. you could pay ~0-20 bucks a month for a sufficiently heavy workload required by all of your exercises (typically these don't need much ram, or run 24/7 anyway).

As a side benefit you also learn to use the kinds of tools that become indispensable in modern devs's work involving large-scale collaborative projects, since localhost installations are notoriously hard to replicate (for a somewhat biased opinion on it, take a look here).

protected by Stephen Kitt Dec 15 '16 at 19:24

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.