3

Problem:

I need to send someone (who has little to no computer knowledge) a python program, but I don't even know if he has python installed let alone all the dependencies.

Question:

Assuming he doesn't have python, how should I go about sending the application so that It is as straightforward as possible for him?

What I've tried:

Initially, I thought of using venv and sending him the whole thing, but there has got to be a better solution, as my code only uses two of the built-in libraries.

In my research, I came across Docker, but I think he would need to have that installed. I also saw pipenv but it wouldn't work without python on his PC.

David Camp
  • 322
  • 2
  • 9

1 Answers1

0

You have multiple ways to do so:

  • Create an executable file, which is quite a long process but can be useful is you project contains a lot of files and multiple dependencies
  • Send them the python code (I recommend it if your project fits in one .py file). The person will need to install python and possibly a few pip libraires, but it's not extremely complicated in my opinion, with clear instructions.
  • Finally, you can go on repl.it and create a repl, which is simply a way to execute code on your browser. I think this is the best option for both large and small projects, except if it contains a lot of odd dependencies, and I'm not sure if repl.it supports graphical interfaces either. Anyway, you should take a look, it might be perfectly fit your needs
  • "but it's not extremely complicated **in my opinion**, with clear instructions" I'd contend a person who finds their way to SO would have a certain baseline curiousity/knowledge of computers that the OP specified the person doesn't meet, but perhaps the OP could write a script to run an installer of some kind on their computer – 0x263A May 31 '22 at 14:51
  • I don't think it's easier to install a homemade python application, which might be blocked by the operating system, than to follow the instructions of the official python installer. If OP needs diverse dependancies, your script idea could indeed come handy. – Red Rapious May 31 '22 at 15:01