How to create virtual env with python3

后端 未结 8 1317
感情败类
感情败类 2020-12-05 06:48

I am using python 2.7 + virtualenv version 1.10.1 for running myproject projects. Due to some other projects requirement I have to work wit

相关标签:
8条回答
  • 2020-12-05 07:18

    Install virtualenvwrapper on top of virtualenv to simplify things. Follow the blog to install in easy steps: virtualenvwrapper

    Steps to create it:

    1. mkvirtualenv -p /usr/bin/python3
    2. Install packages using - pip install package_name
    3. workon - activates the virtualenv, deactivate - deactivates the viirtualenv
    0 讨论(0)
  • 2020-12-05 07:33

    To create virtual env

    virtualenv -p python3 venv_name 
    

    This will create new python executable in baseDirectory/bin/python3

    How to activate newely created Venv:

    cd baseDirectory/bin/  
    
    source activate  
    

    Deactivate new venv

    deactivate 
    
    0 讨论(0)
提交回复
热议问题