How to use pip for pyenv?

When using pyenv, you should be able to set your ‘local’ version in the directory you are working in, and then pip will rely on this version.

So in your case:

pyenv local 2.7.14
pip install package-name

See more on pyenv commands here: https://github.com/pyenv/pyenv/blob/master/COMMANDS.md

But I do think the main piece that is missing here is a ‘virtual environment’ to keep your Python packages independent per project (even if they share the same Python version). It is not necessary based on what you are asking, but it is a generally agreed upon best practice. See the Python docs here for more info.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)