This is an article for me that I want to use Python on Windows but don't put in extra things. Perhaps the installer will not change that.
Download Python for Windows from the official. https://www.python.org/downloads/windows/
I wanted a 64-bit version of Python 3.7, so I downloaded the following.
Note that Python 3.7.6 cannot be used on Windows XP or earlier. ・ Download Windows x86-64 embeddable zip file
I have an operation that installs the application in % USERPROFILE% \ bin
, so I expanded it to% USERPROFILE% \ bin \ python3
.
Add the expanded Python expansion path to the PATH environment variable.
Example
%USERPROFILE%\bin\python3
In the case of Windows 10, the Microsoft Store may start with the python command, so
The Python path must be set before % USERPROFILE% \ AppData \ Local \ Microsoft \ WindowsApps
.
It seems that you can easily insert pip using the installer version, but the ZIP version does not include pip. The official documentation describes how to install it. https://pip.pypa.io/en/stable/installing/ It seems that you can download and run https://bootstrap.pypa.io/get-pip.py.
python get-pip.py
Add the pip path to the environment variable PATH.
[Python expansion path]\Scripts
If it is left as it is, pip will not start properly, so edit [python expansion path] \ python37._pth
to enable the line of ʻimport site`.
python37._pth
python37.zip
.
# Uncomment to run site.main() automatically
- #import site
+ import site
I installed Python and pip because I wanted to use the vim plugin, so I ran the following command to check the operation.
pip install pynvim
Recommended Posts