0

I'm creating a python app to get details from a website. I'm using selenium and pyodbc to create my app. It is getting all the details and saves them into a SQL server database. It is working fine on my pycharm IDE. Now I need to use this app on a hosted server like Linux or ubuntu server. How can I create a .exe file to run my app on a hosted server? And I used pyinstaller to create a .exe file using the following command.

pyinstaller --one main.py

I don't know what are the initial things that I should install on my server. Or is it not necessary to install any of the things to run my app?

1 Answer 1

1

See if this can help:

You can install python on your server and create a service in linux to run it. You don't have to create a .exe file. Also, .exe won't run on linux or ubuntu server.

Here's an article that can help you installing python on linux server: https://www.geeksforgeeks.org/how-to-install-python-on-linux/

Here's an article on how to create a service in linux: https://medium.com/@benmorel/creating-a-linux-service-with-systemd-611b5c8b91d6

Sign up to request clarification or add additional context in comments.

3 Comments

Thank you so much. I'll try these steps
And another matter, How Can I run it on a windows server? I'm new to python.
You can download python for windows also, but there's no direct way to run python scripts as windows service. So, you can use a tool called NSSM. Here's an article that can help: medium.com/@m_ko/…

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.