mac 安装python虚拟环境,多版本共存
首先,安装pip,python的包管理工具
sudo easy_install pip
安装完pip之后,就要安装 virtualenv
sudo pip install virtualenv
如果是用的macOS 10.11可能会出现以下的提示
我用的是macOS 10.12,没有出现以下的提示
The directory '/Users/xxxx/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/Users/xxxx/Library/Caches/pip' or its parent directory is