How to deploy the local virtualenv environment on the server?
The first time I deployed python web, environmental issues caused a headache
習慣沉默2017-05-18 10:51:11
If you put all the dependencies into a file locally, pip freeze > requirements.txt
,把该文件上传到服务器。然后再在服务器上先新建一个python虚拟环境,再激活虚拟环境,切换到requirements.txt文件夹目录下,通过 pip install -r requirements.txt
all dependencies will be installed.
If you have any questions, please feel free to ask again