24

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.

2 Answers 2

23

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.

4
  • So does crouton run with chromeos or do you have to launch it seperately. Jul 24, 2013 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, 2013 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. Sep 21, 2017 at 13:22
  • The Python Shell plugin for Chrome is very limited, and the developer has not responded to questions in over 2 years. I think it's dead, Jim.
    – Matt
    Feb 11, 2020 at 16:31
5

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).

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