Python installation (Windows)

things to do

Make Python available on Windows.

Prerequisites

environment

Advance preparation

Download the necessary files from the following.

procedure

Installation of Python itself

Run the installer

Setting environment variables

Set the following environment variables.

Variable name value
PYTHON_HOME C:\Python27

Add the following two to path

Folder path
%PYTHON_HOME%
%PYTHON_HOME%\Scripts

Verification

> python --version
Python 2.7.6

Interpreter execution

> python
>>> print "hello, world"
hello, world
>>> exit()

Script execution

hello.py


print "hello, world"
> python hello.py
hello, world

hello.py


#coding: UTF-8
print "Hello, world"
> python hello.py
Hello, world

Install easy_setup

Execute the following command in the folder where you downloaded python ez_setup.py.

> python ez_setup.py
.
.
Installed c:\python27\lib\site-packages\setuptools-2.0-py2.7.egg
Processing dependencies for setuptools==2.0
Finished processing dependencies for setuptools==2.0

Install pip (package manager)

Execute the following command.

> easy_install pip
.
.
Installed c:\python27\lib\site-packages\pip-1.4.1-py2.7.egg
Processing dependencies for pip
Finished processing dependencies for pip

Confirmation of installed packages and output example

> pip freeze
Jinja2==2.7.1
MarkupSafe==0.18
Pygments==1.6
Sphinx==1.2
docutils==0.11

Recommended Posts

Python installation (Windows)
Python installation method Windows
Python installation
Python installation
Python 3.6 installation procedure [for Windows]
Fastest Python installation on Windows
Python on Windows
python windows environment
Installation of Python, SciPy, matplotlib (Windows)
[2021 version] Python installation Windows 10 (64bit) edition
Python installation 2020 (macOS)
Python3.4 installation notes
Python basic course (2 Python installation)
Reinforcement learning 1 Python installation
python windows environment construction
Installation of Python 3.3 rc1
Python 2.7 installation (yum) (CentOS 6.8)
Python starting with Windows 7
python basic on windows ②
Install python on windows
Installation of matplotlib (Python 3.3.2)
Install Python (for Windows)
Python 3.5 installation (yum) (CentOS 6.8)
Set-enable Python virtualenv on Windows
Python with VS Code (Windows 10)
python (pyenv + pyenv-virtualenv) + CentOS7 installation
Python CMS Mezzanine installation procedure
How to install Python [Windows]
Run python with PyCharm (Windows)
Install watchdog on Windows + Python 3.3
Install Python and Flask (Windows 10)
Python
Windows10: Install python dlib library
Python + Kivy development on Windows
Python environment construction (Windows10 + Emacs)
Python installation and basic grammar
OpenCV3 installation for Python3 @macOS
Sphinx-autobuild (0.5.2) on Windows7, Python 3.5.1, Sphinx 1.3.5
Python installation (Mac edition) (old)
Build a GVim-based Python development environment on Windows 10 (1) Installation
Build Python environment on Windows
Python 3 series installation for mac
Build python environment on windows
Ruby, Python Module Installation Guide
Python environment construction under Windows7 environment
I ran python on windows
[Python] [Chainer] [Windows] Install Chainer on Windows
Python install in 2 lines @Windows
Use Python on Windows (PyCharm)
Source installation and installation of Python
Time synchronization (Windows) with Python
Python (Python 3.7.7) installation and basic grammar
Install dlib for Python (Windows)
[Python] Show multiple windows in Tkinter
Python environment construction memo on Windows 10
Face detection with YOLO Face (Windows10, Python3.6)
Python 3.6 on Windows ... and to Xamarin.
Installing Kivy on Windows10 64bit Python3.5
Hit a command in Python (Windows)
Installation of SciPy and matplotlib (Python)
I tried to touch Python (installation)