deepin 15.11 安装 pyenv
GitHub:官方环境:https://github.com/pyenv/pyenv/wiki/Common-build-problems
GitHub:官方文档:https://github.com/pyenv/pyenv-installer
一、登录root用户或者使用sudo命令执行以下2步。
1)、解决预先的安装条件
sudo apt-get install -y make build-essential libssl-dev zlib1g-dev libbz2-dev \
libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \
xz-utils tk-dev libffi-dev liblzma-dev python-openssl git
2)、替换 libreadline-dev 环境
sudo apt install libedit-dev
二、登录python用户安装pyenv
1)、执行命令在线获取安装 pyenv
curl https://pyenv.run | bash
== 或者执行下面这条命令,只用执行一条即可 ==
curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
2)、安装结束会有提示将以下信息填写到~/.bashrc 下
vi ~/.bashrc
export PATH="/home/python/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
3)、生效 ./bashrc
source ~./bashrc