Graduate from Python (x, y) and try mixing different versions of Python @Windows

Python installation

download

Use the official distribution binaries at http://www.python.org/.

64bit of 3.4 is omitted

Try PyPy from http://pypy.org/

Installation

CPython runs the installer normally. However, do not select "Add To PATH" for any version. PyPy expanded to C: \ PyPy26.

Install virtualenv

C:\>c:\python27\scripts\pip install virtualenv
You are using pip version 7.0.1, however version 7.1.0 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Collecting virtualenv
  Downloading virtualenv-13.1.0-py2.py3-none-any.whl (1.7MB)
    100% |################################| 1.7MB 236kB/s eta 0:00:01
Installing collected packages: virtualenv
Successfully installed virtualenv-13.1.0

Use virtualenv

In the example, they are all named venv, but it may be better to use a descriptive name.

Python 2.7

C:\Users\kounoike\Documents\python\py27>venv\Scripts\activate.bat
(venv) C:\Users\kounoike\Documents\python\py27>python --version
Python 2.7.10

(venv) C:\Users\kounoike\Documents\python\py27>python
Python 2.7.10 (default, May 23 2015, 09:40:32) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> quit()

Python 2.7-64bit

C:\Users\kounoike\Documents\python\py64>c:\python27\Scripts\virtualenv.exe -p c:\Python27_64\python.exe venv
Running virtualenv with interpreter c:\Python27_64\python.exe
New python executable in venv\Scripts\python.exe
Installing setuptools, pip, wheel...done.

C:\Users\kounoike\Documents\python\py64>venv\Scripts\activate.bat
(venv) C:\Users\kounoike\Documents\python\py64>python --version
Python 2.7.10

(venv) C:\Users\kounoike\Documents\python\py64>python
Python 2.7.10 (default, May 23 2015, 09:44:00) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> quit()

Python 3.4

C:\Users\kounoike\Documents\python\py34>c:\Python27\Scripts\virtualenv.exe -p c:\Python34\python.exe venv
Running virtualenv with interpreter c:\Python34\python.exe
Using base prefix 'c:\\Python34'
New python executable in venv\Scripts\python.exe
Installing setuptools, pip, wheel...done.

C:\Users\kounoike\Documents\python\py34>venv\Scripts\activate.bat
(venv) C:\Users\kounoike\Documents\python\py34>python --version
Python 3.4.3

(venv) C:\Users\kounoike\Documents\python\py34>python
Python 3.4.3 (v3.4.3:9b73f1c3e601, Feb 24 2015, 22:43:06) [MSC v.1600 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> quit()

pypy

C:\Users\kounoike\Documents\python\pypy>c:\python27\Scripts\virtualenv.exe -p c:
\pypy26\pypy.exe venv
Running virtualenv with interpreter c:\pypy26\pypy.exe
New pypy executable in venv\bin\pypy.exe
Installing setuptools, pip, wheel...done.

C:\Users\kounoike\Documents\python\pypy>venv\bin\activate.bat
(venv) C:\Users\kounoike\Documents\python\pypy>where python
C:\Users\kounoike\Documents\python\pypy\venv\bin\python.exe

(venv) C:\Users\kounoike\Documents\python\pypy>python --version
Python 2.7.9 (295ee98b6928, May 31 2015, 14:07:43)
[PyPy 2.6.0 with MSC v.1500 32 bit]

Note that it is venv \ bin \ activate.bat

Use compile-required libraries such as numpy in binary packages

Use the binary packages of Unofficial Windows Binaries for Python Extension Packages.

Frequently used items

I don't like direct URL links, so I'll download them and organize them in an easy-to-understand folder (although I put them directly under Downloads in the examples below).

In the case of PyPy, it seems that another troublesome procedure is required, so I will omit the library.

Recommended Posts

Graduate from Python (x, y) and try mixing different versions of Python @Windows
Let's use different versions of SQLite3 from Python3!
Indent behavior of json.dumps is different between python2 and python3
Using multiple versions of Python on Mac OS X (2) Usage
Different from the import type of python. from A import B meaning
Python: Create a dictionary from a list of keys and values
Install Python and Flask (Windows 10)
Install multiple versions of Python
2.x, 3.x character code of python
Source installation and installation of Python
Build and test a CI environment for multiple versions of Python
Using multiple versions of Python on Mac OS X (1) Multiple Ver installation
[Python] Try to graph from the image of Ring Fit [OCR]
Quickly install OpenCV 2.4 (+ python) on OS X and try the sample
Introduced binding of MeCab (Wakame seaweed) and Python to Windows 7 64bit (2016/08/18)
Run different versions of Python (wsgi) apps on one development environment
[Python] Try to recognize characters from images with OpenCV and pyocr