Install virtualenvwrapper for Python 2.7 and 3.6 simultaneously

浪子不回头ぞ 提交于 2019-12-21 05:27:05

问题


How does one install virtualenvwrapper for both Python 2.7 and 3.6 versions? My default Python environment is Python 3.6 and as such virtualenvwrapper is installed for Python 3.6 and not 2.7. I'm using macOS Sierra 10.12.6.


回答1:


You need only install virtualenvwrapper once. See the warning about installing on your base Python installation.

Using Homebrew package manager install python2 and python3.

Making a virtual environment is a matter of passing a flag.

# make py3
mkvirtualenv py3 --python=python3

# make py2
mkvirtualenv py2 --python=python2


来源:https://stackoverflow.com/questions/45917859/install-virtualenvwrapper-for-python-2-7-and-3-6-simultaneously

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!