Hello,
So I have a program I'm running on my computer from the CMD prompt as well as Python Idle.
How can I load these onto a server to run independent of my computer?
Is it even possible that I can load the program in cmd or idle format and have it run independently? If not how can I just get my program on a server?
you can use pyinstaller (will need to learn how to use), that will create an .exe file which can be run on a system without installing python.
details here:
https://pypi.org/project/PyInstaller/
(Jun-23-2018, 04:16 AM)Larz60+ Wrote: [ -> ]you can use pyinstaller (will need to learn how to use), that will create an .exe file which can be run on a system without installing python.
details here: https://pypi.org/project/PyInstaller/
will this allow me to run the program on a server though?
Yes, it would have to be moved to, or visible from (with exe privileges) the server to do so.
Talking about server then it usually run Linux,the a .exe wont work.
What is your server running?
Usually when i transfer Python code to a server it's for running a web-app.
The i also has a Repo eg GitHub,BitBucket.
Example DigitalOcean VPS have a Linux distro running eg Ubuntu(Droplet) that has Python and Git pre-installed.
Transfer code to server git clone my_repo
.
On local Pc i have also build code with virtual environment.
Then pip install -r requirements.txt
to install dependencies to server.
At this point i could run a script python my_scipt.py
on server.
With a web-app there as more step like eg setting up Gunicorn,Nginx,so other can see web-app in browser.
(Jun-23-2018, 11:11 AM)snippsat Wrote: [ -> ]Talking about server then it usually run Linux,the a .exe wont work.
What is your server running?
Usually when i transfer Python code to a server it's for running a web-app.
The i also has a Repo eg GitHub,BitBucket.
Example DigitalOcean VPS have a Linux distro running eg Ubuntu(Droplet) that has Python and Git pre-installed.
Transfer code to server git clone my_repo
.
On local Pc i have also build code with virtual environment.
Then pip install -r requirements.txt
to install dependencies to server.
At this point i could run a script python my_scipt.py
on server.
With a web-app there as more step like eg setting up Gunicorn,Nginx,so other can see web-app in browser.
Im trying to run instabot.py on a server but I need some server recommendations because pythonanywhere seems to be blocking instagram bot py
Are you using the free account?
Quote:A limited account with one web app at your-username.pythonanywhere.com, restricted outbound Internet access
from your apps
PythonAnywhere is running Linux server environment with uWSGI and Nginx for web-app.
All this is already setup to make it easier for end users.
You can ask if they allow bots.
I like
Digital Ocean.
Quote:Am I allowed to run bots on droplets?
Yes, you are definitely allowed to run a bots on DigitalOcean Droplets.
The only caveat is that the bot needs to follow the terms of service for the platform that it is using.
Digital Ocean VPS you have a lot freedom,start on eg clean Ubuntu distro.
The freedom also mean that you have to manage all yourself.
Can also look into
AWS Lambda for no server setup
Quote:AWS Lambda lets you run code without provisioning or managing servers.
You pay only for the compute time you consume - there is no charge when your code is not running.