pyenv-win icon indicating copy to clipboard operation
pyenv-win copied to clipboard

'pyenv' is not recognized as the name of a cmdlet

Open zhammadd opened this issue 1 year ago • 2 comments

I have tried various ways to install pyenv but nothing has worked so far. I am starting from scratch using the official docs:

https://github.com/pyenv-win/pyenv-win/blob/master/docs/installation.md#powershell

Here, the recommend the Powershell method as the easiest. I run this command and it runs without an error.

Invoke-WebRequest -UseBasicParsing -Uri "https://raw.githubusercontent.com/pyenv-win/pyenv-win/master/pyenv-win/install-pyenv-win.ps1" -OutFile "./install-pyenv-win.ps1"; &"./install-pyenv-win.ps1"

However, when I try to run pyenv or pyenv install 3.11.6, it gives me an error that:

PS C:\Users\Ctrend> pyenv
pyenv : The term 'pyenv' is not recognized as the name of a cmdlet, function, script file, or operable program. 

I have tried restarting the Powershell terminal already.

According to the docs, I don't have to do anything else but maybe there are some environment variables to be set? If yes, where and how exactly do I set them?

SYSTEM variables or USER variables? What exactly do I name them and what exactly is the VALUE? I have tried everything on all stackoverflow answers but nothing helped.

zhammadd avatar Feb 25 '24 00:02 zhammadd

restarting windows did it for me. but before that I also ran the commands cited here: https://github.com/pyenv-win/pyenv-win/blob/master/docs/installation.md#add-system-settings and I don't know if it actually had influence on this or not.

radandevist avatar Mar 14 '24 17:03 radandevist

Привет, если ты используешь Windows попробуй прописать в переменную PATH путь до .pyenv. Твой путь будет примерно C:\Users\YOUR_NAME.pyenv\pyenv-win\bin. Потом просто перезапусти powershell от администратора. Это сработало для меня))

black6berry avatar May 16 '24 21:05 black6berry