第一步,先从官网下载tar.xz安装包
如果没有cache,先创建一个目录:
cd ~/.pyenv
mkdir cache
把安装包放到cache文件夹下:
mv Python-3.5.4.tar.xz ~/.pyenv/cache
执行安装:
pyenv install 3.5.4
出现以下提示表示正在安装
Installing Python-3.5.4...
Installed Python-3.5.4 to /home/root/.pyenv/versions/3.5.4