Created
October 28, 2019 01:42
-
-
Save 0xa/0ffb2a698acd3852f4b1af83f5c6834d to your computer and use it in GitHub Desktop.
get an usable python3 user environment for poetry on debian buster
This file contains hidden or 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
# as root | |
apt install python3 python3-distutils python3-pkg-resources python3-venv | |
# rest as your project user | |
su - projectuser | |
# Create python shims (poetry needs "python" and "pip") | |
mkdir ~/.local/bin/ -p | |
ln -s /usr/bin/python3 $HOME/.local/bin/python | |
ln -s /usr/bin/pip $HOME/.local/bin/pip | |
echo 'export PATH="$HOME/.local/bin:$PATH"' > ~/.profile && source ~/.profile | |
# Install poetry | |
curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py | python | |
source $HOME/.poetry/env | |
poetry config settings.virtualenvs.in-project true | |
# fucking finally an usable environment | |
cd project && poetry install | |
# venv is right here in .venv |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment