Pyenv:修订间差异

来自Gea-Suan Lin's Wiki
跳到导航 跳到搜索
此页面具有访问限制。如果您看见此消息,则说明您没有权限访问此页面。
第13行: 第13行:
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
git clone https://github.com/pyenv/pyenv.git ~/.pyenv; echo -e "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; source ~/.profile; pyenv install 3.8.5; pyenv global 3.8.5; pip install -U pip; pip install -U poetry
git clone https://github.com/pyenv/pyenv.git ~/.pyenv; echo -e "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; source ~/.profile; pyenv install 3.8.5; pyenv global 3.8.5; pip install -U pip; pip install -U poetry
</syntaxhighlight>
== 升級 ==
<syntaxhighlight lang="bash">
cd ~/.pyenv; git pull -v
</syntaxhighlight>
</syntaxhighlight>



2020年8月8日 (六) 14:07的版本

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

安裝

先安裝系統需要的套件:

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

接下來在自己的空間下安裝pyenv,然後安裝最新版的Python,並且更新pip:

git clone https://github.com/pyenv/pyenv.git ~/.pyenv; echo -e "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; source ~/.profile; pyenv install 3.8.5; pyenv global 3.8.5; pip install -U pip; pip install -U poetry

升級

cd ~/.pyenv; git pull -v

相關條目

外部連結