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
Post a Comment