virtualenvwrapper and Python 3

后端 未结 9 1989
执念已碎
执念已碎 2020-12-22 17:06

I installed python 3.3.1 on ubuntu lucid and successfully created a virtualenv as below

virtualenv envpy331 --python=/usr/local/bin/python3.3
9条回答
  •  南方客
    南方客 (楼主)
    2020-12-22 17:58

    I find that running

    export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3
    

    and

    export VIRTUALENVWRAPPER_VIRTUALENV=/usr/bin/virtualenv-3.4
    

    in the command line on Ubuntu forces mkvirtualenv to use python3 and virtualenv-3.4. One still has to do

    mkvirtualenv --python=/usr/bin/python3 nameOfEnvironment
    

    to create the environment. This is assuming that you have python3 in /usr/bin/python3 and virtualenv-3.4 in /usr/local/bin/virtualenv-3.4.

提交回复
热议问题