Skip to content

Instantly share code, notes, and snippets.

@retarfi
Created March 22, 2024 09:47
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 retarfi/630f1a47eb6a37026b7591aa9b66d69e to your computer and use it in GitHub Desktop.
Save retarfi/630f1a47eb6a37026b7591aa9b66d69e to your computer and use it in GitHub Desktop.
ユーザー権限でPython周りをインストールするときの設定
# pyenv
echo 'git clone https://github.com/pyenv/pyenv.git ~/.pyenv'
git clone https://github.com/pyenv/pyenv.git ~/.pyenv
echo "writing ~/.bash_profile ....."
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bash_profile
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bash_profile
echo 'eval "$(pyenv init --path)"' >> ~/.bash_profile
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bash_profile
echo 'test -r ~/.bashrc && . ~/.bashrc' >> ~/.bash_profile
source ~/.bash_profile
echo "install python 3.11.8"
pyenv install 3.11.8
pyenv global 3.11.8
# poetry
curl -sSL https://install.python-poetry.org | ~/.pyenv/shims/python -
poetry config virtualenvs.in-project false
# poetry env use $(pyenv which python3.11)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment