首先默认安装了virtualenv 创建python3虚拟环境 your-name@node-name:~/virtual_env$ virtualenv -p /usr/bin/python3 py3env 接着会输出 Already using interpreter /usr/bin/python3 Using base prefix '/usr' New python executable in /home/your_name/virtual_env/py3env/bin/python3…
首先默认安装了virtualenv 创建python2虚拟环境 your-name@node-name:~/virtual_env$ virtualenv -p /usr/bin/python2 py2env 接着会输出 Running virtualenv with interpreter /usr/bin/python2 New python executable in /home/your_name/virtual_env/py2env/bin/python2 Also creating…
总结: 1.输出安装的包信息,并在另一个环境快速安装 Generate output suitable for a requirements file. $ pip freeze docutils==0.11 Jinja2==2.7.2 MarkupSafe==0.19 Pygments==1.6 Sphinx==1.2.2 Generate a requirements file and then install from it in another environment. $ env1/b…