How many types of Python do you have in Windows 10? I had 5 types.

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.

Why did you try to write this article

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.

Installer classification

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:

Edit the environment variable and specify python to be used preferentially

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.

Which Python did you leave behind?

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.

Garbage folders found alongside

Deleted without asking questions

Why and how to deal with launching python from Git Bash with Permission denied.

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.

approach

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)

  1. Do not use Git Bash because it can be executed from cmd and powershell
  2. Install python other than the Microsoft Store version, and lower the priority of the path of ʻUSERPROFILE% \ AppData \ Local \ Microsoft \ WindowsApps`.

Summary

Watch out for Python pollution on Windows 10

reference

https://qiita.com/ozaki_physics/items/0547604eabf445e34969

Recommended Posts

How many types of Python do you have in Windows 10? I had 5 types.
How many types of Python do you have on your macOS? I had 401 types.
How much do you know the basics of Python?
How to do R chartr () in Python
How do I represent the data passed in Curl --data-urlencode in Python Requests?
Python --How do you split a list into evenly sized chunks in Python?
I want to do Dunnett's test in Python
[Python] How to use two types of type ()
I want to use Python in the environment of pyenv + pipenv on Windows 10
Summary of how to import files in Python 3
Summary of how to use MNIST in Python
What I do when imitating embedded go in python
Basics of I / O screen using tkinter in python3
How to get the number of digits in Python
I tried to summarize how to use matplotlib of python
How to do hash calculation with salt in Python
% And str.format () in Python. Which one do you use?
I tried to summarize how to use pandas in python
To do the equivalent of Ruby's ObjectSpace._id2ref in Python
[Python] How do you use lambda expressions? ?? [Scribbles] [Continued-1]
Python Minor Environment Retsuden-How many Python environments do you know? ~
I want to do something in Python when I finish
Organize types in Python
[Django 2.2] How do you display relation destinations in Django? [List View]
I tried the accuracy of three Stirling's approximations in python
Why do you add a main ()-if statement in Python?
[Python version] Why can't you do object-oriented development in Java?
I want to do something like sort uniq in Python
If you write TinderBot in Python, she can do it
How to import a file anywhere you like in Python
Have the equation graph of the linear function drawn in Python
[Python beginner] How do I develop and execute Python after all?
I tried "How to get a method decorated in Python"
I measured various methods of interprocess communication in multiprocessing of python3
How to develop in a virtual environment of Python [Memo]
Comparison of how to use higher-order functions in Python 2 and 3
How to implement Python EXE for Windows in Docker container
How to get a list of built-in exceptions in python
A set of script files that do wordcloud in Python3
I tried to implement blackjack of card game in Python
[Python] What do you do with visualization of 4 or more variables?
Part 1 I wrote the answer to the reference problem of how to write offline in real time in Python
I wrote python in Japanese
How to install Python [Windows]
Equivalence of objects in Python
I ran python on windows
How to develop in Python
I understand Python in Japanese!
Implementation of quicksort in Python
What I learned in Python
Python install in 2 lines @Windows
How do you collect information?
Do you want to wait for general purpose in Python Selenium?
How to determine the existence of a selenium element in Python
[Python] How to force a method of a subclass to do something specific
I compared the calculation time of the moving average written in Python
If you get stuck in Cannot load mkl_intel_thread.dll in Python on Windows
How to know the internal structure of an object in Python
What to do if you get a minus zero in Python
How to check the memory size of a variable in Python
How to use Python Kivy (reference) -I translated Kivy Language of API reference-