I've recently installed pyenv-win on my Windows machine using the pip documentation as I already had Python 3.8.5 installed on my machine. Having used pyenv to set the global version to 3.7.6:
- Running
pyenv which pythonreturnsC:\Users\Haydn\.pyenv\pyenv-win\versions\3.7.6\python.exeas expected - However, running
python -VreturnsPython 3.8.5 - and
pip -Vreturnspip 20.2.2 from C:\Users\Haydn\AppData\Roaming\Python\Python38\site-packages\pip (python 3.8)
Installing other packages such as pipenv does so in the Python 3.8 folder and fails, as do projects requiring Python 3.7. I'm trying to work out what I could have done wrong or might not be working so that the pyenv 3.7 version is used over the system 3.8.
Everything seems to have progressed fine during installation:
pyenv --versionreturnspyenv 2.64.3- Environment variable
PYENVis set toC:\Users\Haydn\.pyenv\pyenv-win\ C:\Users\Haydn\.pyenv\pyenv-win\bin&C:\Users\Haydn\.pyenv\pyenv-win\shimsare added to thePathenvironment variable.
I don't know much about environment variables, but my suspicion is towards the fact that installing Python 3.7 using pyenv has not added anything to my Path variable (see screenshot), so when I call python it's just moving into the 3.8 folder as expected. I feel like pyenv should have added something here but that may not be how the package works and something else could very well be the cause.
Thanks in advance for your help