Skip to content

Instantly share code, notes, and snippets.

@hongjonghwa
Last active January 27, 2023 12:57
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 hongjonghwa/06ba5f9c50ecb4d5f627a1fa30270a53 to your computer and use it in GitHub Desktop.
Save hongjonghwa/06ba5f9c50ecb4d5f627a1fa30270a53 to your computer and use it in GitHub Desktop.
# 1) pyenv install
git clone https://github.com/pyenv/pyenv.git ~/.pyenv
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc
echo 'command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(pyenv init -)"' >> ~/.bashrc
# ~/.bashrc 외 ~/.profile, ~/.bash_profile, ~/.bash_login, ~/.zshrc ~/.zprofile, ~/.zlogin 등등
# 2) pyenv-virtualenv install
git clone https://github.com/pyenv/pyenv-virtualenv.git ~/.pyenv/plugins/pyenv-virtualenv
echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.bashrc
# 3) execute shell
exec "$SHELL"
# 4) install python
# Install dependencies
# - https://devguide.python.org/getting-started/setup-building/index.html#install-dependencies
# pyenv install --list
pyenv install 3.8.13
pyenv virtualenv 3.8.13 myVenv
echo 'myVenv' > my-python-work-folder/.python-version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment