3 ms·
I think it's better to create a virtualenv for each project and install tox and other project dependencies there. In addition, I'm not sure tox-pyenv is requir
by saila 6y ago
I think it's better to create a virtualenv for each project and install tox and other project dependencies there.
In addition, I'm not sure tox-pyenv is required. I use tox with multiple pyenv-installed Python versions and have never used it.
Base:
- install homebrew
- brew install openssl readline sqlite3 xz zlib # recommended
- brew install pyenv
- pyenv install <version> # for one or more versions
Project:
- create/clone project directory
- cd project directory
- pyenv local x.y.z x.y.z ... # include each version the project supports
- python3 -m venv .venv # create virtualenv for project using one of the pyenv versions
- install the project into the virtualenv
- install any additional dependencies into this virtualenv too, if necessary
Edit: I'd also add that if you do need a tool to be installed globally, it's better to use pipx or pip with --user. It's generally not a good idea to install things into a system-level Python.
https://pipxproject.github.io/pipx/ https://pipxproject.github.io/pipx/