2020-03-10 Update1: How many types of Python do you have on your macOS? I had 401 types. Update2: Warikan Cancer Insurance
2020-03-15 Update3: Fixed the title to Windows 10 from Window 10. It was an unconscious typo.
The title is fanning. On WSL Ubuntu 18.04, there were 3 types via pyenv + 2 types derived from the OS, for a total of 10 types.
I will explain the background. Since I opened Windows 10 for a long time, I ran it without checking the Visual Studio Comminity 2019 update and the update of the application from Microsft Store as a security update, but python did not start from Git bash. ..
In the first place, installing python for Microsoft Store was not even intended, but since python execution from Git Bash caused an error, in the process of searching for the cause, the installation status of python (including the wreckage of the past) was checked. investigated.
version | installer type | installed path |
---|---|---|
python 3.7.5 | Visual studio community 2019 installer | "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64" |
python 3.8.2 | Microsoft Store | (alias) "%USERPROFILE%\AppData\Local\Microsoft\WindowsApps" |
python 3.6.5 | Anaconda | (Just me) "%USERPROFILE%\Anaconda3" (All users) "C:\ProgramData\Anaconda3" [Personally"C:\Anaconda"Had changed to] |
python 3.7.4 | R's reticulate installation of miniconda | "%LOCALAPPDATA%\r-miniconda" |
python 3.5.2 | Official exec installer | "%LOCALAPPDATA%\Programs\Python\Python35" |
Note:
%LOCALAPPDATA%
is C:\Users\your_login_name\AppData\Local
%USERPROFILE%
is C:\Users\your_login_name
Press [Window key] and type path
to select Edit system environment variables
. Double-click Environment Variables-> Variable PATH. Adjust the path of the python you want to use with priority with up
.
Note that Windows 10 contains the ultimate horrifying bug, which means that when you enter environment variables in the GUI (user environment variables and system environment variables respectively), it doesn't recognize more than 2048 characters. The article of @IT is very helpful.
Since I have a lot of work on WSL Ubuntu, I deleted all python on Windows. I used it occasionally with reticulate from RSutido, so I decided to leave that much. There is no inconvenience so far.
Deleted without asking questions
python -V
bash: /c/Users/your_account/AppData/Local/Microsoft/WindowsApps/python: Permission denied
This is because when you run python -V
etc. from Git Bash, the MiscroSoft Store version of python is installed and the first python is found in ʻUSERPROFILE% \ AppData \ Local \ Microsoft \ WindowsApps` as path. This is an error that occurs in.
Due to a bug derived from MINGW, there is no fundamental workaround for execution from Git Bash (including via vscode terminal). (Reported on Python official bug tracker, [on stackoverflow](https://stackoverflow.com/questions/56974927/permission-denied-trying-to -run-python-on-windows-10]) Commentary)
Watch out for Python pollution on Windows 10
https://qiita.com/ozaki_physics/items/0547604eabf445e34969
Recommended Posts