Use different Python version with virtualenv

后端 未结 30 3906
自闭症患者
自闭症患者 2020-11-21 05:03

I have a Debian system currently running with python 2.5.4. I got virtualenv properly installed, everything is working fine. Is there a possibility that I can use a virtuale

30条回答
  •  半阙折子戏
    2020-11-21 05:26

    Just use the --python (or short -p) option when creating your virtualenv instance to specify the Python executable you want to use, e.g.:

    virtualenv --python=/usr/bin/python2.6 
    

    N.B. For Python 3.3 or later, refer to The Aelfinn's answer below.

提交回复
热议问题