sudo apt update # 更新软件包索引 | |
sudo apt upgrade # 升级全部已安装的软件包 |
sudo apt install -y build-essential libssl-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libffi-dev zlib1g-dev python3-openssl git |
curl https://pyenv.run | bash |
sudo apt install pyenv |
export PATH="$HOME/.pyenv/binPATH" | |
eval "$(pyenv init --path)" | |
eval "$(pyenv init -)" | |
eval "$(pyenv virtualenv-init -)" |
source ~/.bashrc |
pyenv install 3.8.12 | |
pyenv install 3.9.7 |
pyenv versions |
pyenv global 3.8.12 |
pyenv local 3.9.7 |
python --version |
python3.8 --version | |
python3.9 --version |
pyenv virtualenv 3.9.7 myenv | |
pyenv activate myenv |
sudo add-apt-repository ppa:deadsnakes/ppa | |
sudo apt-get update |
sudo apt-get install python3.8 python3.10 |
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 1 | |
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 2 |
sudo update-alternatives --config python3 |
ls /usr/bin/python* |
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.8 1 | |
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.9 2 |
sudo update-alternatives --display python |
sudo update-alternatives --config python |
欢迎光临 ToB企服应用市场:ToB评测及商务社交产业平台 (https://dis.qidao123.com/) | Powered by Discuz! X3.4 |