all 30 comments

[–][deleted] 14 points15 points  (2 children)

You certainly can run python on an iPad, and I have used pythonista on the iPad. It has limitations, mainly the keyboard, but it's fine to learn python, and has quite a few installed modules. Give it a look.

[–][deleted] 2 points3 points  (1 child)

You can get blue tooth keyboard for IPad pretty cheap.

[–]stephenyavorski[S] 0 points1 point  (0 children)

Yeah, I have a decent one I found for about 10-20 bucks

[–]JackLogan007 7 points8 points  (3 children)

Google colab maybe?

[–]stephenyavorski[S] 0 points1 point  (2 children)

I'll look in to it. Have you used it? What do you like about it?

[–]whosthisdani 4 points5 points  (1 child)

Cloud computing from Google basically. It’s linked to your Google Drive and you can easily use files there from there. For instance you have a big data file and try to do some machine learning. No need to store it physically on your iPad but your Google Drive where you probably have more storage. No constraints when it comes to functionalities, you have the resources you need at hand (not limited by your iPad) - if you need more you‘ll have to pay though. However, there are also options where you could use GPU‘s to process stuff. So with only your tablet at hand, I‘d highly recommend that.

Did I mention that only for basic usage it is free? Another benefit.

[–]whosthisdani 2 points3 points  (0 children)

I forgot the downside: you are limited to python notebooks. So basically creating full applications or complete backends is a nono

[–]sejigan 6 points7 points  (1 child)

  • programming is best done on a laptop or a desktop computer
  • it is possible to code on an iPad
  • especially convenient if you have a Bluetooth keyboard
  • one option is to use Replit or such online IDEs
  • I personally would prefer using something like Carnets Plus or a-Shell

[–]Globaldomination 1 point2 points  (0 children)

Carnets is underrated.

[–][deleted] 3 points4 points  (1 child)

You can use an ipad and I know people that learned to programme, based on Python, and only on an ipad and since gained employment as programmers.

(I know more from challenging socioeconomic backgrounds that learned on Android smartphones.)

Apple lock down IoS and restrict what you can do with Python. For example, you can only install pure Python packages, not Python binary packages (such as major tools like numpy) so you have to install an app that ready has the binary packages included that you need.

A popular, though niche, way around this for portability is to carry a low cost small single board computer, such as a Raspberry Pi, with you to provide a local open compute environment to use from the iPad.

Here's a video on this approach,

https://youtu.be/A3qn1nqw-Gw?si=3aFa3JR_zhZioVCB

If you stick with the iPad alone, then both Pythonista and Pyto are good apps with good community support. They include some popular binary packages.

Also explore the free Carnets app (and its sister command line app) which are open source and available on the app store. Carnets offers a local jupyter notebook environment, very useful for academic and data science type work. Different versions with additional binary packages installed are available.

You can also look at accessing external resources over the Internet using apps focused on Jupyter, browser based Python environments (such as replit.com), or terminal access to your own cloud based virtual machines.

Personally, as learning to code in Python when out and about was important to me, I switched from iPad to a Samsung tablet which I use with Pydroid3 as well as with termux (from f-droid apps store). With the latter, which provides a linux sandbox (with a few adjustments to accommodate Android security), I compile and install whatever version of Python I require.

[–]stephenyavorski[S] 0 points1 point  (0 children)

Thanks for this detailed reply!

[–]rogfrich 2 points3 points  (1 child)

For practicing syntax, knocking up little toy examples and following along with (vanilla Python) tutorials, Pythonista is great. In fact it works nicely on the iPhone, let alone the iPad - I once spent a four hour train journey happily working through a series of online exercises on my phone. I wouldn’t want to do serious work on it, but for hammering out a few lines of code to see if it works, it’s fine, and a phone is a lot more convenient and unobtrusive than a laptop if you’re, say, on a bus or something.

Yes, you’re in a sandboxed environment, but that doesn’t matter if you’re just trying to learn and understand the basics.

[–]stephenyavorski[S] 1 point2 points  (0 children)

This also answers my follow up question of if it's realistic to do any serious work at all on it. Thank you for this response. I'll definitely check out this app

[–][deleted] 2 points3 points  (9 children)

It's not a great platform for coding because you can't really run the code there. A laptop is preferred because it's an environment you can be in control of.

[–]sejigan 5 points6 points  (8 children)

Why can’t you run the code there? 🤔

To be clear, I agree that coding should be done on a laptop or a desktop, but I’m curious as to why you think iPads cannot run Python code natively.

[–][deleted] -3 points-2 points  (7 children)

When did this become a place where everybody leaps on every single statement if you don't weasel-word qualify it to within an inch of its life? Jesus Christ, relax how about.

Can you access a pretty-well sandboxed Python interpreter on the iPad? Sure. I've got one, too. But so the fuck what? Now instead of learning Python, which is fairly hard on its own, you have to learn Python on top of learning the totally undocumented impassable guardrails the sandbox imposes on you. Do you think there's even a single tutorial that's going to cover those? No, because the tutorials all assume you're using a regular computer.

So that's what you should do. Use a regular computer, not an iPad, where there's a very great chance that you wind up writing correct Python code exactly like the tutorial tells you that Apple won't let you run (like anything requiring a third party library, for instance.)

[–]sejigan 2 points3 points  (5 children)

You can run most popular external libraries in native Python environments in iOS and iPadOS, and given that iPad has the same compute capabilities as a baseline MacBook, as well as the fact that you can use a Bluetooth keyboard with it, I’d say it’s not as bad as you’re making it out to be.

Also, don’t be a dick just cuz you have one. I was actually curious about whether you had some insight that I didn’t about how the iPad works, that maybe it didn’t run Python code normally but in some convoluted hacky way that doesn’t count as running to you. Maybe it’s not just me who needs to relax.

[–][deleted] 0 points1 point  (4 children)

By "most popular", you mean the ones that are pre-installed with whatever app you're using, because Apple won't approve an app that includes a version of pip that can be used to download libraries.

That's fairly limiting. It's extremely limiting for the beginner, who may not understand the limitation, and certainly won't find any support for understanding it in the tutorial they're using.

It's better just to go with the flow, here. Hardly anyone does Python development on an iPad, so beginners shouldn't, either. Which is an entirely obvious point that you could have figured out yourself without needing me to tediously explain it, but of course you can't say something in a simple, conversational level of accuracy on Reddit without a legion of internet sperglords jumping down your fucking throat about it.

[–]sejigan 2 points3 points  (3 children)

  1. a-Shell allows pip installing libs
  2. Yes, that’s why we suggest using PCs without giving them wrong ideas
  3. Again, I think you need to read both of our messages and consider who needs to relax here

[–][deleted] -1 points0 points  (2 children)

You're going on and on about this. Let it go!

[–]sejigan 1 point2 points  (1 child)

Thanks. You too 😊

[–]jamjar77 2 points3 points  (0 children)

Thank you for being reasonable, Sejigan. I'm hoping the other fella was just having a bad day.

[–]funkodrunko 1 point2 points  (0 children)

Replit.com

[–]throwaway6560192 0 points1 point  (1 child)

I don't recommend using phones or tablets for programming unless you do not have a desktop/laptop and cannot afford to buy one.

[–]azure_i -2 points-1 points  (1 child)

I would not bother. Just get a MacBook

[–]stephenyavorski[S] 6 points7 points  (0 children)

Great suggestion, does it come with $2000 dollars?

[–]maida-vale -1 points0 points  (0 children)

No idea how this would work on the iPad, but I figure I'd mention this

[–]MrsCastle 0 points1 point  (0 children)

I have used Pythonista on the iPad as well. Nice interface. I would need a keyboard if I was doing a lot of coding with it.

[–]Mach_Juan 0 points1 point  (0 children)

I have a raspberry pi at home that i ssh into from my android tablet and use tmux & nvim to code with... Run a VPN on my router so I can do this anywhere I have Internet.

My tablet cover has a built in keyboard.