How to deploy a python webapp with dependencies using virtualenv?

前端 未结 1 1188
清酒与你
清酒与你 2021-02-04 20:37

I\'m looking for a way to automate deployment of web applications written in Python to a server. I would like to use virtualenv to have a clean environment for this app

相关标签:
1条回答
  • 2021-02-04 21:19

    With pip you can create a requirements file:

    $ pip freeze > requirements.txt
    

    Then in the server to install all of these you do:

    $ pip install -r requirements.txt
    

    And with this (if the server has everything necessary to build the binary packages that you might have included) all is ready.

    0 讨论(0)
提交回复
热议问题