There is already a official document to guide you how to install Python on Microsoft Windows through an installer, you might prefer this way.

Python 3

Download

Download the installer from offical download page.

file

Install

file

Install Python to C:\Python37.

So the path is supposed to:

C:\Python37

Add this directory C:\Python37 to the Windows environment path.

Pip

You can ignore this section if your Python version is the lastest.

Pip is automatically installed since Python 2.7.9 and Python 3.4. If you use older version, you might install Pip by using get-pip.py

The following steps are for installing Pip, the package manager of Python.

Download get-pip.py

https://bootstrap.pypa.io/get-pip.py

Install Pip

python get-pip.py

file

Pip will be installed to Scripts directory as the screenshot below.

file

Add this directory C:\Python37\Scripts to the Windows environment path.

Environment Variables

The Python and Pip directoies should be listed in PATH just look like the below.

file

PATH

setx /M PATH "%PATH%;C:\Python37;C:\Python37\Scripts"

PYTHONPATH

setx /M PYTHONPATH "C:\Python37;C:\Python37\DLLs;C:\Python37\lib;C:\Python37\lib\plat-win;C:\Python37\lib\site-packages"

Done.

Now, you can start your first Python script. Happy learning!

Last modified: July 29, 2019

Author

Comments

Write a Reply or Comment

Your email address will not be published.