Linux 环境安装
cd /tmp
1. yum install openssl-devel bzip2-devel expat-devel gdbm-devel readline-devel sqlite-devel mysql-devel gcc gcc-devel python-devel
2. wget "https://www.python.org/ftp/python/3.5.0/Python-3.5.0.tgz"
3. tar -zxvf Python-3.5.0.tgz
4. mkdir /usr/local/python3
5. Python-3.5.0/configure --prefix=/usr/local/python3
6. make
7. make install
8. ln -s /usr/local/python3/bin/python3 /usr/bin/python3
安装pip3 和 virtualenv
ln -s /usr/local/python3/bin/pip3 /usr/bin/pip3
pip install virtualenv
ln -s /usr/local/python3/bin/virtualenv /usr/bin/virtualenv
virtualenv -p /usr/bin/python3 环境名称
网友评论