Skip to content

Instantly share code, notes, and snippets.

@cedricbonhomme
Last active November 24, 2021 13: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 cedricbonhomme/ababe00d0a675ea5c69d777276e8f375 to your computer and use it in GitHub Desktop.
Save cedricbonhomme/ababe00d0a675ea5c69d777276e8f375 to your computer and use it in GitHub Desktop.
My Python environment for 2021
# 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