I'm using notebooks mostly, so on the commandline I often only want to install a specific package for a specific python version I have. Currently, I usually change the global python version, run pip
and change the global version back. Is there a way to execute a single command in a specific pyenv
version?
run single command in specific python version with pyenv
You can override which version/environment is being used via the PYENV_VERSION environment variable
# PYENV_VERSION=2.7.15 pip install package
# PYENV_VERSION=3.6.6/some_virtualenv ipython
© 2022 - 2024 — McMap. All rights reserved.