Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

pyenv on windows - not recognized as internal or external command

I have a project were I have t use python 2.7 instead of 3.x. In order to do this, I installed pyenv-win on my windows machine but its not working.

I followed the steps mentioned here but still getting in the cmd

pyenv is not recognized as an internal or external command

I am wondering is it becaue I put this %USERPROFILE% as is without having it as a separate environment variable ? And if this is the case what exactly should this %USERPROFILE% be ?

Update

  • I added USERPROFILE as a SYSTEM VARIABLE I made it the link to my user on the PC i.e. C:/Users/Anonymous
  • I added %PYENV%\bin to user path
  • I added %PYENV%\shims to user path

Now if I run pyenv --version I get pyenv WITHOUT version specified.

like image 808
Anonymous Avatar asked Mar 19 '26 10:03

Anonymous


1 Answers

I've solved it using cmd pip install pyenv-win==3.1.1 --target %USERPROFILE%\.pyenv --upgrade after several failed attempts to manage it via power shell or manually.

like image 116
Elena Avatar answered Mar 24 '26 05:03

Elena



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!