How to run a Python script on your server and import libraries -


i'm launching website , want python script run. however, not work when run because depends on 5 libraries. how link them code? example, use pymysql write data host's database. however, not recognise pymysql. there way download of packages once on server , being able access them? how link them in code?

many !

there many ways this, easiest way use pip freeze > requirements.txt list (requirements.txt) of dependencies have installed project (which, if you're running under virtualenv, installed project).

if have installed multiple libraries interpreter don't need, can remove them list, or create list manually.

you can make pip install libraries again on host doing pip -r requirements.txt.


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -