Use different Python version with virtualenv

后端 未结 30 3391
自闭症患者
自闭症患者 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:15

    Suppose you currently have python 2.7 installed in your virtualenv. But want to make use of python3.2, You would have to update this with:

    $ virtualenv --python=/usr/bin/python3.2 name_of_your_virtualenv
    

    Then activate your virtualenv by:

    $ source activate name_of_your_virtualenv
    

    and then do: python --version in shell to check whether your version is now updated.

提交回复
热议问题