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

bug:The pyenv-win is not able to change installed python version.

Open leojay-wang opened this issue 6 years ago • 4 comments

Describe the bug I have installed pyenv-win suscessfully according to https://github.com/pyenv-win/pyenv-win/blob/master/README.md but version of python doesn't change.

To Reproduce Steps to reproduce the behavior:

  1. executed command "pyenv install 2.7.18"
  2. cd to project folder.It's "D:/python_test" for me.
  3. executed command "pyenv local 2.7.18",The D:/python/.python-version generate.
  4. executed command "pyenv versions",cmd show below:
* 2.7.18 (set by D:\python_test\.python-version)

5.Make sure current version of python,I executed command "pyenv which python",cmd show below:

C:\Users\lejie\.pyenv\pyenv-win\versions\2.7.18\python.exe

6.When I executed command "python -V",cmd show my system version of python,but not 2.7.18。

D:\python_test>pyenv versions
* 2.7.18 (set by D:\python_test\.python-version)

D:\python_test>pyenv which python
C:\Users\lejie\.pyenv\pyenv-win\versions\2.7.18\python.exe

D:\python_test>python -V
Python 3.7.6

D:\python_test>python
Python 3.7.6 (tags/v3.7.6:43364a7ae0, Dec 19 2019, 00:42:30) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>

Expected behavior The python version should be 2.7.18 step 6 in Reproduce.

Screenshots QQ截图20200925151219.png

Desktop (please complete the following information):

  • OS: Windows10 1909
  • The version of pyenv-win is 2.64.3

Additional context When I installing pyenv-win,I attention to:

NOTE: If you are running Windows 10 1905 or newer, you made need to disable the built-in Python launcher via Start > "Manage App Execution Aliases" and disabling the "App Installer" aliases for Python

I'm sure I have do this.see below photo please: QQ截图20200925151659.png

leojay-wang avatar Sep 25 '20 07:09 leojay-wang

Can you paste the system and user paths please.

kirankotari avatar Sep 25 '20 10:09 kirankotari

Can you paste the system and user paths please.

Of course I can. The user path is below:

C:\Users\lejie\.pyenv\pyenv-win\bin;C:\Users\lejie\.pyenv\pyenv-win\shims;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\Common Files\Intel\Shared Files\cpp\bin\Intel64;C:\Program Files (x86)\Common Files\Intel\Shared Libraries\redist\intel64\compiler;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Users\lejie\AppData\Local\Microsoft\WindowsApps;C:\Program Files\Bandizip\;C:\Users\lejie\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\lejie\AppData\Roaming\npm;C:\Users\lejie\AppData\Local\Programs\Fiddler;C:\Users\lejie\AppData\Local\Microsoft\WindowsApps;

If above user path is not readability,see below image please: user1.png

And the system path is:

C:\Program Files\Python37\Scripts\;C:\Program Files\Python37\;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;%C_EM64T_REDIST11%bin\Intel64;%INTEL_DEV_REDIST%redist\intel64\compiler;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;%SYSTEMROOT%\System32\OpenSSH\;%JAVA_HOME%\bin;C:\Program Files\nodejs\;C:\Program Files (x86)\qemu-img-win-x64-2_3_0;

If above system path is not readability,see below image please: system.png

leojay-wang avatar Sep 25 '20 11:09 leojay-wang

same error for me it does changed when typing pyenv version, however not changing when entering python -V

tingweichien avatar Oct 11 '20 11:10 tingweichien

@redleavescn It's due to your system path. C:\Program Files\Python37\Scripts\;C:\Program Files\Python37\; can you remove them and check.

kirankotari avatar Oct 12 '20 12:10 kirankotari