Hung-Chi's Blog on github

Easy way to install both Python2.x and Python3.x in Windows

python check version

This document aims to give an easy way to install both Python 2 &3. Python is a useful script programing language, but I never use it before. This is the first time I used. Recently, my manager wants me to write a tool to convert in game xml string table to Excel file. We must use Python3 (Unicode support) to deal with multi-language, and sadly our game compiler is based on Python 2… So, it’s also my first problem to face with.

© Hung-Chi's Blog

Install Python2 &3

Go to the Python download page and download Python

  1. Firstly, install python 2.x
    For example, install in C:\Python27
  2. Install python 3.x
    For example, install in C:\Python36-32

install python example

Rename Python3

Go to python3 folder C:\Python36-32 rename python to python3 rename python3

Add System Environment Variables

add system environment back for Python2. (Because Python3 is installed)


Check Python3 is corrently set.



Just Open CMD and check both python is correctly install.

python --version
python3 --version

python check version

P.S. Use pip with python3

A sample to use pip install xlrd(excel read).

python3 -m pip install xlrd