Pyenv that manages the Python version. Mac and Linux have a path to call the conventional Python version as System, but Windows does not. I searched many sites such as Qiita but did not find it, so here is a summary of how to add the conventional Python path as System to Windows versions. Click here for the video commentary.
Symbolic links refer to directories and are similar to shortcuts. The difference between them is whether the type is a folder or a shortcut.
I created a folder shortcut for Python in versions, but I couldn't load it. Perhaps the pyenv command versions
only recognizes folders. A symbolic link is created by hitting the following with a command prompt opened with administrator privileges.
cmd.exe
mklink /D <The path of the directory to create> <Existing directory path>
Let's add it immediately. Type the following with a command prompt opened with administrator privileges.
cmd.exe
mklink /D C:\Users\mai\.pyenv\pyenv-win\versions\System C:\Users\mai\AppData\Local\Programs\Python
If you haven't changed the installation location of Python or pyenv-win, it will be the same path as mine.
If you check with versions
, System will be displayed in the same way as the installed version. The rest is the same as the version change
cmd.exe
pyenv global System
If you hit, it will be the conventional Python version.
In this way, the added System and traditional Python are in sync. Therefore, it is necessary to note that the library installed under the pyenv environment remains even when the pyenv environment is deleted and the original Python is restored.
Recommended Posts