mac下安装指定版本python
本文mac下python为2.7.12
要安装的版本为python3.5.3
1.安装virtualenv
请自行查阅资料安装
2.安装virtualenvwrapper
请自行查阅资料安装
3.安装python3.5.3
下载python源码包,编译,安装
wget https://www.python.org/ftp/python/3.5.3/Python-3.5.3.tgz
tar -xvf python-3.5.3.tgz
cd python-3.5.3
./configure --prefix=/Users/yonghuming/.python35 # 指定安装目录
make
sudo make install
4.创建python3.5.3的虚拟环境
mkvirtualenv -p /Users/yonghuming/.python35/bin/python3 envpy35