Closed cderv closed 1 year ago
Can you please send me the output of the following commands when run in PowerShell.
echo $env:PYENV_HOME
ls $env:PYENV_HOME\versions
The issue probably has to do with the way Scoop has installed pyenv-win. I dont use Scoop so didnt encounter this issue before. Is Scoop officially supported? I dont see it in pyenv-win's README
Is Scoop officially supported? I dont see it in pyenv-win's README
I don't see it either so I asked: https://github.com/pyenv-win/pyenv-win/issues/435
Scoop is quite used on windows for package management, it is good to have pyenv in it. However, it may not be set up correctly (yet) and I am happy to help fix it.
it seems for example I don't have PYENV_HOME
set. I have PYENV
only.
> Get-ChildItem -Path Env: | Where-Object -FilterScript {$_.Name -contains "PYENV"}
Name Value
---- -----
PYENV C:\Users\chris\scoop\apps\pyenv\current\pyenv-win
So probably Scoop should add the other environment defined here at installation (https://github.com/pyenv-win/pyenv-win#add-system-settings) as you are relying on them, right ? It just seems 3 times the same path in 3 different env var 🤔
So probably Scoop should add the other environment defined here at installation (https://github.com/pyenv-win/pyenv-win#add-system-settings) as you are relying on them, right ?
Yes. It is checking if the given python version exists by looking at $PYENV_HOME\versions
so it needs that environment variable.
Better to add all the environment variables mentioned in https://github.com/pyenv-win/pyenv-win#add-system-settings
It just seems 3 times the same path in 3 different env var
True. No idea why it is that way.
Anyway, let me know if the issue is fixed after adding all the required environment variables.
Found the reason for setting multiple env vars for the same path. https://github.com/pyenv-win/pyenv-win/pull/313
Yes. It is checking if the given python version exists by looking at $PYENV_HOME\versions so it needs that environment variable.
Ok great. I'll see about that. I was suprised that the python versions was still found by pyenv-win-venv
pyenv-venv list python
Python Versions installed:
* 3.9.13 (set by C:\Users\chris\scoop\apps\pyenv\current\pyenv-win\version)
There is two mechanisms I guess.
I was suprised that the python versions was still found by pyenv-win-venv
It's able to find the python versions because it is just runningpyenv versions
whenever pyenv-venv list python
is run.
Thanks a lot for the help. I'll close this, and fix in Scoop
FWIW here is the PR to change scoop installer to have expected env var: https://github.com/ScoopInstaller/Main/pull/3950
Great. That would be very helpful for future Scoop users. 👍
fyi choco install has the same problem! it only sets the $PYENV env variable and not root or home.
Hi,
I am trying to use this project with pyenv-win, but creating the venv does not work as expected
I am using pyenv installed through scoop