Virtualenv and source version control

后端 未结 2 856
臣服心动
臣服心动 2020-12-04 08:15

I recently started a Django project and I quickly realized that virtualenv will be really useful for many reasons. I set up the virtualenv and my project, but now I wonder w

2条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-04 09:00

    You generate a "requirements" file (usually requirements.txt) that you commit with your project:

    pip freeze > requirements.txt
    

    Then, each developer will set up their own virtualenv and run:

    pip install -r requirements.txt
    

提交回复
热议问题