Created
March 22, 2024 09:47
-
-
Save retarfi/630f1a47eb6a37026b7591aa9b66d69e to your computer and use it in GitHub Desktop.
ユーザー権限でPython周りをインストールするときの設定
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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