Skip to content

Instantly share code, notes, and snippets.

@passionsjin
Created February 2, 2021 09:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save passionsjin/ef5169d46e3f5b257df1e7dded090898 to your computer and use it in GitHub Desktop.
Save passionsjin/ef5169d46e3f5b257df1e7dded090898 to your computer and use it in GitHub Desktop.
pyenv & virtualenv 설치
  • pyenv


git clone https://github.com/pyenv/pyenv.git ~/.pyenv

echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bash_profile
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bash_profile
echo 'eval "$(pyenv init -)"' >> ~/.bash_profile

source ~/.bash_profile
pyenv versions
  • virtual env 설치 및 세팅
sudo apt-get install -y make build-essential zlib1g-dev libffi-dev libssl-dev \
libreadline-dev libsqlite3-dev libbz2-dev

(wget curl llvm libncurses5-dev libncursesw5-dev \
xz-utils tk-dev)

pyenv install -list

pyenv install 3.9.1

git clone https://github.com/yyuu/pyenv-virtualenv.git ~/.pyenv/plugins/pyenv-virtualenv
echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.bash_profile
source ~/.bash_profile

pyenv virtualenv 3.5.2 test-env

pyenv activate test-env

(project_dir) pyenv local test-env

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment