This article contains affiliate links. See my affiliate disclosure for more information.
People complain that the iPad Pro isn't "pro" enough. I mean, Apple released a tablet with a leading processor and up to 16GB of RAM. With no support for pro apps like coding IDEs!
Or did they? 🤔
It's true: you can't install Visual Studio Code on your iPad, natively. But there are several professional-grade coding apps in the App Store, especially for Python programmers… if you know where to look.
Here are five ways you can code in Python on any iPad right now:
- a-Shell: A full-featured Unix terminal with Python and many other tools.
- Carnets: A local Jupyter client with Python, NumPy, pandas, and other stats and data science packages.
- Juno: A unique, premium Jupyter client that also includes Python and many scientific and data-related packages.
- Juno Connect: A beautiful Jupyter client for connecting to remote servers.
- Codeanywhere Cloud IDE: Code on all of your devices with a modern VS Code-inspired IDE (it even runs most of the marketplace extensions!). You can even share your environment live with teammates, with Google Docs-like collaboration tools.
Personally, I use a-Shell and Codeanywhere the most. Read on for more details.
My goto app for using Python on the iPad is Nicolas Holzschuch’s fantastic a-Shell app. a-Shell gives you a Unix-style terminal on your iPad or iPhone and it’s completely free. It’s also quite powerful.
Click here to open a-Shell in the Apple Store \(\rightarrow\)
Once you install and open a-Shell, type
help to get a quick overview of the app:
a-Shell comes with
ed for editing files, and it includes Python 3.9 out-of-the box. Here’s what editing a Python file in
vim looks like:
Esckey. This makes working in vim painful until you figure out that
Cmd + .works like
Esc. If you'd like, you can change
Caps Lockto work as
Escin a-Shell’s settings.
You can also map the globe key on the Magic Keyboard to function as
Escin the Settings app.
a-Shell plays nicely with iPadOS 15’s multi-tasking features. You can open new windows, put a-Shell side-by-side with another app, and — my favorite — use a-Shell in slideover mode.
I do a lot of reading on my iPad. When I come across something that I want to check in the Python REPL, it’s incredibly helpful to be able to swipe in from the right-hand-side of my iPad, quickly check something in the REPL, and then dismiss the app by swiping right:
You can install Python packages using
pip in a-Shell as long as those package are pure Python. This is admittedly a serious limitation for a lot of folks, but it does allow you to install some pretty awesome packages — including Will McGugan’s awesome rich library:
Besides being a great way to use Python on your iPad, a-Shell has a lot of other useful features. You can navigate your iPad’s file system, transfer files using
curl, generate SSH keys, SSH into remote servers, and more. You can even write programs in C and C++ and run them on your iPad 🤯
One of a-Shell’s major downsides is the lack of support for Python virtual environments. This means a-Shell is great for testing things out, or for doing some basic, pure-Python programming, but it’s not very well suited to professional development.
Carnets is a free, standalone Jupyter notebook app available on iPad and iPhone. You get a full Python and Jupyter implementation — no need to connect to an external Jupyter server — as well as a handful of useful Python packages, including NumPy, pandas, and Matplotlib.
Click here to view Carnets on the App Store \(\rightarrow\)
You can create, view, and edit notebook files, including ones that you created elsewhere or were sent to you by a colleague. The thing that I like most about it is that it “just works.” Download the app and in a few minutes you’re running Jupyter notebooks right on your iPad.
Carnet’s interface looks just like Jupyter in a browser. But what you see is what you get. There aren’t any bells and whistles here.
If you need to install a package that doesn’t come with Carnets, you can use
%pip install inside of a notebook cell to install the package:
To see all of the Python packages you get with Carnets, run
%pip list. There are quite a few — although many you see in the following list were installed by me or as dependencies of packages I installed:
There are two versions of Carnets available in the App Store:
Carnets – Jupyter (with scipy) includes a few additional packages for doing machine learning right on your iPad:
coremltools. If you can afford the extra space, I highly recommend downloading Carnets – Jupyter (with scipy) instead of the base Carnets app.
Like a-Shell, the Carnets app doesn’t let you create isolated Python environments. You’re stuck using the global environment and whatever package versions come pre-built with the app.
Juno is another Jupyter notebook app for the iPad that bills itself as a Jupyter IDE. Like Carnets, you get Python bundled with some extra packages. Unlike Carnets, Juno costs $15 and comes with some nice bonus features.
Click here view Juno on the App Store \(\rightarrow\)
Juno really stands out from Carnets with its sleek and modern iPad interface:
You can run cells by pressing
Shift + Enter inside of the cell or by tapping the blue Run Cell button at the bottom right-hand corner of the screen.
The lightning bolt button gives you quick access to some common tasks. You can change the cell type from code to Markdown, move cells up and down, and cut, copy, paste, and delete cells:
While Carnets can open Jupyter notebooks from anywhere on your iPad, the interface isn’t very iPad-friendly. Contrast this to Juno’s file picker, which really feels at home on iPad and iOS devices:
Another area where Juno shines is the IDE-like tab completion and tooltips that come built-in:
Like Carnets, Juno comes with a suite of built-in packages. But you can’t run
%pip list in a cell to see them all like you can in Carnets:
Package management in Juno is actually a bit of a disappointment, especially for an app that costs $15.
I couldn’t find a complete list of packages that come pre-installed with Juno, but here are a few imports that worked out of the box:
To install a package, click the name of the notebook at the top-center of the screen and select Install Python Package. You’ll see the following dialog box:
Like Carnets and a-Shell, you can only install pure Python packages. But unlike Carnets and a-Shell, any dependencies of a package you install won’t be installed automatically. You’ll need to install them manually one-by-one.
One nice thing about Juno’s package manger is that you get a chance to see some metadata for a package before you install it, including dependencies — which you can install at the touch of a button:
As I mentioned before, you can’t use
%pip list in Juno to view the packages you have installed into Juno’s environment. In fact, there is no way to view your installed packages from within Juno.
Instead, you must open the Files app and navigate to the
site_packages/ folder in Juno’s on-device storage:
If you want to remove one of your installed packages, you need to do that manually from within
site_packages/. I find this to be a major shortcoming. I really appreciate the quick access to
pip using the
%pip magic command supported by Carnets.
Despite the clunky package manager, Juno does look much nicer than Carnets and the tab-completion and tooltips do boost productivity. If those features matter to you and you’re willing to fork over the $15, then Juno is a nice option.
4. Juno Connect
Juno Connect is a Jupyter notebook client app that can be used to access Jupyter on a remote server. So, technicaly, Python isn’t running on your iPad, but Juno Connect provides a beautiful interface for working with remote notebook servers. You can purchase it from the App Store for $10.
Click here to view Juno Connect on the App Store \(\rightarrow\)
When you first launch Juno Connect, you’ll a see a screen with some notebooks ready to try out, as well as several options to connect to remote notebook servers:
Juno Connect support services like Cocalc and Binder right out of the box. You can also connect to Jupyter servers hosted elsewhere, such as on a Digital Ocean droplet.
When you connect to a notebook server, you’ll see a screen like the one below, where you can create a new notebook or select one to open:
Once you open or create a new notebook, you’ll see an interface that looks exactly like the typical Juno interface. And since the notebook is running on an external server, you get access to all of the typical Jupyter features, including the
%pip magic that doesn’t work with the local-only version of Juno:
One nice feature of Juno Connect is the ability to export a remote notebook to a local file on your iPad:
You can even export the notebook as a new notebook, allowing you to save a local copy to work with offline in either Juno or the Carnets app.
5. Codeanywhere Cloud IDE
The last option on my list isn’t an iPad app and it doesn’t run Python locally on your iPad, but it’s absolutely essential if you need access to a full-blown development environment. That solution is the Codeanywhere Cloud IDE.
Plans start at $6 per month and you can get a 40% discount if you prepay for two years. This unlocks a VS Code style IDE that runs entirely in your browser.
Once you choose a plan and create an account, you’ll be taken to your dashboard where you can create new containers for working on projects:
When you click on New Container, you’ll have the opportunity use a blank Ubuntu Linux container or to select from some pre-defined containers with various languages pre-installed:
Once you create a container, it takes a few minutes for it to spin-up and become available to you in your dashboard:
The resources you get per container depend on the plan you selected. My plan gives me 15GB of storage and 4GB of memory.
Click the green Open IDE button to launch the IDE in a new browser tab:
If you’re familiar with VS Code, you’ll feel right at home in Codeanywhere’s IDE. It’s incredibly full-featured, including things like linter and debugging support:
You can even install extensions!
Codeanywhere is pricy compared to the other options mentioned in this list. It also requires an internet connection. But, I can’t live without it. It’s the best way I’ve found to do some hardcore coding on my iPad.
Additional Ways To Code In Python On Your iPad
The five tools I've mentioned are what I currently use day-in and day-out to run Python on my iPad, but there are a number of other options that deserve a mention.
Whenever I bring up coding in Python on the iPad, I get a flurry of comments praising the Pythonista3 app. There was a time when Pythonista3 was a great option, but that’s no longer the case in my opinion.
First of all, Pythonista3 appears to be completely abandoned. The last version was released over a year ago before iPadOS 14 was available (the current version of iPadOS at the time of writing is 15). And, second, Pythonista3 only supports Python 3.6, which reached it’s end of life in December 2021.
The PyTo app is a serious contender in the Python-for-iPad space. You get Python 3.10 running locally with a nice IDE-style experience, support for editing multiple files, several bonus packages including NumPy, SciPy, Scikit-learn, and statsmodels. The full app experience costs $10.
I'm currently giving PyTo a run for it's money to see how it fits into my daily use. If it lives up to it's promise, you might find it higher up on the list in a future update to this article!
Google’s Colab is a browser-based notebook based on Jupyter notebooks. Your code runs on a private virtual machine that comes with most of the Python scientific stack pre-installed. You even get free access to GPUs, which makes Colab a great option for machine learning projects. If you need guaranteed uptime and more power, check out Colab Pro.
I've never used GitHub's Codespaces project, but if you have a GitHub organization on the Team or Enterprise plan, this might be a good option. It looks very similar to Codeanywhere.
The pyodide project brings Python and over seventy-five package in Python's scientific stack to any browser by compiling them all to WebAssembly. You can try pyodide in a REPL and bookmark it for quick access in the future.
iPad + RaspberryPi
Another option is to connect your iPad to a Raspberry Pi via USB, which allows you to access the Raspberry Pi as an ethernet device. This is really cool, but personaly I don’t want to have to carry any more devices around with me than I need to. It does make for a fun little project, though, and gets you access to a full local development server.
I’d love to see a native version of an IDE like VS Code on the iPad, but I don’t think it will ever happen. However, between a-Shell, Carnets, and Codeanywhere, I’ve been able to do everything that I’ve needed to from my iPad. Of course, your mileage may vary.
So, in 2022, coding in Python on the iPad is not only feasible, it’s actually quite fun!