标签:class http 创建 com zip2 eva blog log dev
1.下载pyenv源码
git clone https://gitee.com/krypln/pyenv.git ~/.pyenv
2.将pyenv 的路径写入配置文件
#>echo ‘export PYENV_ROOT="$HOME/.pyenv"‘ >> ~/.bashrc #>echo ‘export PATH="$PYENV_ROOT/bin:$PATH"‘ >> ~/.bashrc #>echo -e ‘if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init -)"\nfi‘ >> ~/.bashrc #>exec $SHELL
3.安装完成
pyenv versions
4.下载 安装python ,下载国内源的python
#创建pyenv 的缓存目录 mkdir $PYENV_ROOT/cache && cd $PYENV_ROOT/cache #下载python安装包 wget https://mirrors.huaweicloud.com/python/3.8.6/Python-3.8.6.tar.xz #安装python编译所需第三方库 sudo yum install zlib-devel bzip2 bzip2-devel readline-devel sqlite sqlite-devel openssl-devel xz xz-devel libffi-devel git wget #编译安装 pyenv install 3.8.6
#全局使用 3.8.6
pyenv global
5.下载pyenv-virtualenv
git clone https://gitee.com/krypln/pyenv-virtualenv.git $(pyenv root)/plugins/pyenv-virtualenv echo ‘eval "$(pyenv virtualenv-init -)"‘ >> ~/.bashrc exec $SHELL
6. 在3.8.6 的基础上新建虚拟环境
pyenv virtualenv nuoblog 3.8.6
标签:class http 创建 com zip2 eva blog log dev
原文地址:https://www.cnblogs.com/krypln/p/14620941.html