Nospoko / dotfiles

0 stars 0 forks source link

python venv setup #1

Open roszcz opened 3 years ago

roszcz commented 3 years ago

system essentials:

sudo apt install -y build-essential libssl-dev libffi-dev sqlite3 libsqlite3-dev libreadline-dev  libbz2-dev liblzma-dev

follow this: https://alysivji.github.io/setting-up-pyenv-virtualenvwrapper.html

tldr: https://github.com/pyenv/pyenv#installation https://github.com/pyenv/pyenv-virtualenvwrapper#installing-pyenv-virtualenvwrapper-as-a-pyenv-plugin

append to .bashrc:

export PYENV_VIRTUALENVWRAPPER_PREFER_PYVENV="true"
export WORKON_HOME=$HOME/.virtualenvs
pyenv virtualenvwrapper_lazy
roszcz commented 2 years ago

To make a venv with a specific python version:

pyenv install 3.10
pyenv global 3.10
mkvirtualenv new-venv

see: https://gist.github.com/wronk/a902185f5f8ed018263d828e1027009b#using-the-workflow