methods to create a virtual environment for python

1. pyvenv /path/to/new/virtual/environment

2. pip install virtualenv

    virtualenv /path/to/new/virtual/environment

3. python3 -m venv /path/to/new/virtual/environment

 after this command there is no output, just go to next command. Today, making a virtual environment waste too much my time. Rememer it.

then all of above:

    source <dir> bin/activate

 

Last but not least, notice the difference between pip and pip3, python3 and python3.4

Reference Link:

1. https://packaging.python.org/en/latest/installing/#creating-virtual-environments

2. https://www.python.org/dev/peps/pep-0405/

posted @ 2016-04-21 21:58  bajunma123  阅读(185)  评论(0编辑  收藏  举报