pyenv-win / pyenv-win-venv

A CLI to manage virtual envs with pyenv-win
Apache License 2.0
78 stars 8 forks source link

Installs version from active environment instead of provided version #8

Closed Jerakin closed 1 year ago

Jerakin commented 1 year ago

Reproduction Case

pyenv install 3.7.4

pyenv install 3.7.9

pyenv-venv install 3.7.9 env379

pyenv-venv activate env379

pyenv-venv install 3.7.4 env374

The output will say Installing env: test374 using Python v3.7.4

But if you look in the directory and start the python.exe you will see that its the wrong version (3.7.9 in this case)

Jerakin commented 1 year ago

I think we might need to deactivate the current environment then install the new environment then activate the old again.

arzkar commented 1 year ago

@Jerakin Hey, I added a fix for this to a testing branch. Can you download the updated bin files and copy the files to your pyenv-venv installation directory's bin and check if this fixes the issue for you?

https://github.com/pyenv-win/pyenv-win-venv/tree/issue8_fix