Specify Python Version for Virtualenv in Requirements.txt

后端 未结 4 575
离开以前
离开以前 2021-01-04 01:06

I\'m using virtualenv to develop a django application with a team. The server we\'re deploying on is running python 2.6, but the default for our machines is 2.7.3. Is there

4条回答
  •  感情败类
    2021-01-04 01:29

    Neither pip nor virtualenv install python (though pip tries). They use whatever you specify.

    You could write a README that mentions required Python version or provide a fabric script that can deploy to localhost and specify the version there. For example, instructions to install virtualenv, pip, distribute.

    For those people who don't read instructions there could be a CI system (jenkins, buildbot) that can run unit-tests using supported python versions (before/after commit).

    To manage multiple python installation you could use something like pythonz.

提交回复
热议问题