We will explore various ways to install Python and related tools on a Windows OS. We will start with installing Python onto Windows command and how to start a Virtualenv session. We will explore how we can use Docker containers to run Python on Ubuntu from a Windows OS.
To install Python onto Windows using the following link: Python.org
Verify that Python is installed correctly by querying the version using the below command. If you encounter ‘’’Python’ is not recognized as an internal or external command …“ while using the CMD command line, check that python is part of the Path environment variable.
$ python --version
To obtain an isolated python environment install Virtualenv using python’s package management system known as PIP source. The following command shows how to install and create an isolated environment:
$ python pip install virtualenv
The DockerFile below is used to create an environment for running Python. The file uses a base Linux (Ubuntu) image with Python installed. The pip.conf file defines custom repository locations used to retrieve python packages.
Below shows a script used to build the DockerFile: