0

I made a Python program for a client, and he wants the python program to run on Ubuntu server. I am not familiar at all with Linux.

I do not understand, what he mean by "Ubuntu Server". Does he mean, he has a website that runs on Ubuntu server? He needs the program ready in next few hours, I asked him for clarification on this thing, but he is probably sleeping, and I need to make the project ready as soon as possible.

john doe
  • 109
  • 2
  • Probably `python /path/to/python/script.py`. – Liso Jun 01 '19 at 03:30
  • Ubuntu Server is a flavor of stock Ubuntu without any GUI, and with some extra server packages. The admin communicates with the server using shell only, usually over an ssh connection. It can *serve* webpages and graphical environments to clients. Python 3 is already included on all flavors of Ubuntu. Python 2 is already included on most flavors, and is trivially added on the rest. – user535733 Jun 01 '19 at 03:34
  • Hey, he said He don't want the script to run on his pc. If not in PC, how will he access the script?? Via a website right? I don't understand :/ Sorry – john doe Jun 01 '19 at 03:34
  • ohh that makes sense @user535733 thanks a lot – john doe Jun 01 '19 at 03:35

1 Answers1

1

There are several different versions of python:

$ ls /usr/bin/python* 
/usr/bin/python  /usr/bin/python2  /usr/bin/python2.7  /usr/bin/python3  /usr/bin/python3.5  /usr/bin/python3.5m  /usr/bin/python3m  /usr/bin/pythontex  /usr/bin/pythontex3

Pick the one you want, I'll use /usr/bin/python for the example. Make the 1st line of your script be:

#!/usr/bin/python
waltinator
  • 35,099
  • 19
  • 57
  • 93