Last active
November 24, 2021 13:47
-
-
Save cedricbonhomme/ababe00d0a675ea5c69d777276e8f375 to your computer and use it in GitHub Desktop.
My Python environment for 2021
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
# Installation of a decent editor, emacs | |
$ sudo apt install emacs | |
# Prerequisites to build Python | |
$ sudo apt install make build-essential libssl-dev zlib1g-dev libbz2-dev \ | |
libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \ | |
xz-utils tk-dev libffi-dev liblzma-dev libxml2-dev libxslt-dev libpq-dev python3-openssl | |
# Installation of pyenv | |
$ curl https://pyenv.run | bash | |
# Always use the latest stable version of Python | |
$ pyenv install 3.10.0 | |
# if needed: | |
# $ CONFIGURE_OPTS=--enable-shared pyenv install 3.10.0 | |
# if you encouter a GCC bug, try: | |
# $ CFLAGS="-O0 -ggdb" CONFIGURE_OPTS=--enable-shared pyenv install 3.10.0 | |
$ pyenv global 3.10.0 | |
# Installation of pipx | |
$ python -m pip install --user pipx | |
$ python -m userpath append ~/.local/bin | |
# Installation of poetry | |
$ curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/install-poetry.py | python - | |
# You might now be interested by this Gist: | |
# https://gist.github.com/cedricbonhomme/4e2420230e032f0a4ae3e0dc7b34b58f |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment