- git clone
$ git clone https://github.com/pyenv/pyenv.git ~/.pyenv
>>>
Cloning into '/home/naranja/.pyenv'...
...
set up the environment.
- vi ~/.profile
#Add below
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init --path)"
- vi ~/.bashrc
#Add below
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"
#If installed the virtualenv
eval "$(pyenv virtualenv-init -)"
- source ~/.bashrc
source means read and executes the following files.
$ source ~/.bashrc
Check availability of python version.
- pyenv install --list
$ pyenv install --list
>>>
Available versions:
2.1.3
2.2.3
2.3.7
...
Install the python.
$ pyenv install 3.9.7
>>>
Downloading Python-3.9.7.tar.xz...
...
- pyenv versions
Check pyenv environments lists
$ pyenv versions
system
3.9.7
3.9.7/envs/nlp_env
- pyenv activate
$ pyenv activate nlp_env
'Linux' 카테고리의 다른 글
xsrf' argument missing from POST (0) | 2022.05.12 |
---|---|
ip addr show, su root, curl, url, yum, adduser root, sudo gpasswd -a apl wheel, wheel (0) | 2021.05.18 |