- 更新apt下载源
cd /etc/apt/&& cp sources.list sources.list.bk&& echo deb https://mirrors.tuna.tsinghua.edu.cn/debian/ buster main contrib non-free > sources.list&& echo deb https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-updates main contrib non-free >> sources.list&& echo deb https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-backports main contrib non-free >> sources.list&& echo deb https://mirrors.tuna.tsinghua.edu.cn/debian-security/ buster/updates main contrib non-free >> sources.list&& echo deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ buster main contrib non-free >> sources.list&& echo deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-updates main contrib non-free >> sources.list&& echo deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-backports main contrib non-free >> sources.list&& echo deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-security/ buster/updates main contrib non-free >> sources.list&& apt update&& echo 换源已完成!&& cd /home
-
安装依赖
apt-get install -y 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
-
按照顺序执行
curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
echo 'export PATH="$HOME/.pyenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(pyenv init -)"' >> ~/.bashrc
echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.bashrc
exec $SHELL -l