search

Home  >  Q&A  >  body text

python - How to deploy the local virtualenv environment on the server?

How to deploy the local virtualenv environment on the server?
The first time I deployed python web, environmental issues caused a headache

PHPzPHPz2754 days ago639

reply all(1)I'll reply

  • 習慣沉默

    習慣沉默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.txtall dependencies will be installed.

    If you have any questions, please feel free to ask again

    reply
    0
  • Cancelreply