pyenv-virtualenv is the tool to seperate python environment.
- git clone
$ git clone https://github.com/yyuu/pyenv-virtualenv.git ~/.pyenv/plugins/pyenv-virtualenv
>>>
Cloning into '/home/naranja/.pyenv/plugins/pyenv-virtualenv'...
...
set up the environment.
- vi ~/.bashrc
#Add below
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init --path)"
eval "$(pyenv init -)"
- source ~/.bashrc
source means read and executes the following files.
$ source ~/.bashrc
Install virtualenv and name it.
#pyenv virtualenv [version] [name]
$ pyenv virtualenv 3.9.7 jupyter-env
>>>
Looking in links: /tmp/tmpttvar64k
...
Access into virtualenv.
$ pyenv local jupyter-env
>>>
(jupyter-env) naranja@cpu-server1:~/jupyter$
Install app and etc.
For example, install jupyter.
(jupyter-env) naranja@cpu-server1:~/jupyter$ python3 -m pip install jupyter
>>>
...
Downloading jupyter-1.0.0-py2.py3-none-any.whl (2.7 kB)
...
(jupyter-env) naranja@cpu-server1:~/jupyter$ python3 -m pip install pandas numpy scikit-learn matplotlib
...
'Linux > terminal' 카테고리의 다른 글
error : The command could not be located because '/usr/bin:/bin' is not included in the PATH environment variable (0) | 2023.04.10 |
---|---|
Copy files from remote server to local (0) | 2022.11.16 |
How to add new server (0) | 2022.03.31 |
shell, bash (0) | 2022.03.15 |
How to connect to the server from the client, set to alias. (0) | 2022.03.15 |