Pyenv:修订间差异

来自Gea-Suan Lin's Wiki
跳到导航 跳到搜索
此页面具有访问限制。如果您看见此消息,则说明您没有权限访问此页面。
第12行: 第12行:


<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
git clone https://github.com/pyenv/pyenv.git ~/.pyenv
git clone https://github.com/pyenv/pyenv.git ~/.pyenv; echo "export PYENV_ROOT=\"\${HOME}/.pyenv\"\nif [ -d "\${PYENV_ROOT}" ]; then\n   export PATH="\${PYENV_ROOT}/bin:\${PYENV_ROOT}/shims:\${PATH}\"\n   eval \"\$(pyenv init - --no-rehash)\"\nfi" >> ~/.profile
</syntaxhighlight>
</syntaxhighlight>



2020年2月12日 (三) 05:52的版本

pyenv是一套在使用者环境下管理多个不同Python版本的套件。

安装

先安装系统需要的套件:

sudo apt install -y build-essential libbz2-dev libcurl4-openssl-dev libffi-dev libreadline-dev libsqlite3-dev libssl-dev libz-dev; sudo apt clean

接下来在自己的空间下安装pyenv:

git clone https://github.com/pyenv/pyenv.git ~/.pyenv; echo "export PYENV_ROOT=\"\${HOME}/.pyenv\"\nif [ -d "\${PYENV_ROOT}" ]; then\n    export PATH="\${PYENV_ROOT}/bin:\${PYENV_ROOT}/shims:\${PATH}\"\n    eval \"\$(pyenv init - --no-rehash)\"\nfi" >> ~/.profile

相关条目

外部链接