pyenv-win / pyenv-win

pyenv for Windows. pyenv is a simple python version management tool. It lets you easily switch between multiple versions of Python. It's simple, unobtrusive, and follows the UNIX tradition of single-purpose tools that do one thing well.
https://pyenv-win.github.io/pyenv-win
MIT License
4.71k stars 433 forks source link

The system cannot find the path specified. #567

Open GioPat opened 9 months ago

GioPat commented 9 months ago

Describe the bug Despite following the README (Manually check the settings) and disabling the built-in Python launcher via Start > "Manage App Execution Aliases" and turning off the "App Installer" aliases for Python I still face the The system cannot find the path specified..

To Reproduce Steps to reproduce the behavior:

  1. Follow the guide
  2. Fresh install pyenv-win
  3. pyenv version

Expected behavior No error appearing

Desktop (please complete the following information):

ijustlovemath commented 8 months ago

I'm also getting this, I suspect it has to do with all the path adding that happens in pyenv.bat, but I'm not great with Powershell/cmd.exe, so have been unable to find where this happens

Darsstar commented 8 months ago

Are %PYENV%, %PYENV_ROOT% and %PYENV_HOME% are the same value? Is %PYENV_ROOT%/bin on %PATH%?

echo %PYENV%
echo %PYENV_ROOT%
echo %PYENV_HOME%
echo %PATH%
ijustlovemath commented 7 months ago

Yes, all of this is set up correctly.

echo $env:PATH -split ";" | grep pyenv

image

echo $env:PYENV $env:PYENV_ROOT $env:PYENV_HOME

image

It still eventually finds pyenv, eg I can still use it from the CLI, but it searches in 4 paths that don't exist first.

When I use the Run prompt to run python:

image

This is the output:

image

ealap commented 6 months ago

I had the same issue and after hours of searching for an answer, I found that the problem was with the Command Prompt program as suggested by the top answer in this StackOverflow question.

It turns out I have an autorun program for CMD that has an outdated path used by an application (clink in my case).

I corrected it by modifying one of the following registry keys via regedit.

HKEY_CURRENT_USER\Software\Microsoft\Command Processor\AutoRun
HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\AutoRun

I hope you all had the issue as mine and this can help. 🍻