如何使用 Pyenv 在 Linux 实现 Python的完美版本控制
操作系统准备 准备Linux最小系统即可。 如果在虚拟机中克隆,MAC地址会变。 这里使用CentOS 6.5+ 安装 1,首先安全git yum install git -y 2,安装Python环境依赖 yum -y install git gcc make patch gdbm-devel openssl-devel sqlite-devel readline-devel zlib-devel bzip2-devel 3,创建python用户 useradd python 4、使用python用户登录后安装Pyenv $ curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash 下载的 pyenv-installer 是一个shell脚本。注意: 在 https://github.com/pyenv/pyenv-installer 有安装文档 如果curl出现 curl: (35) SSL connect error ,是nss版本低的问题,更新它。 可能需要配置一个有较新包的yum源,如下在/etc/yum.repo/ 新增一个源,然后更新 [updates] name=CentOS-Updates baseurl= https://mirrors