If you are using Windows you have to do some more configuration than using a Unix-like system (Linux, Mac).
The only thing you need is to add Python and pip to the PATH to have it available through the command line. And this you can achieve in three fashions.
One is a temporal one where you write a batch script which launches and sets the PATH every time you open up the command line through this script. I will not go into deeper detail how to achieve this, because this is not the best approach in my opinion and sometimes you want to access Python from where you are.
The two permanent solutions are the same, the only difference is that in one version you have to do the same steps manually as the other does automatically.
The automatic version is to set the checkbox “Add Python 3.5 to PATH” when you install Python. This creates automatically the entries required in the PATH which enables you the access to Python through the command line.
Alternatively if you choose “Customize installation” there you have the option too to add Python to the PATH.
Add Python to PATH during installation
The second version is for those who missed the previous step. In this case you have to edit your PATH manually. Now here are the steps:
Open up the “Start menu” on your Windows and select “Control Panel”:
Open up the Control Panel
In the “Control Panel” select “System and Security”:
Select System and Security
In the “System and Security” view select “System”:
Select System
In the “System” view select “Advanced system settings” from the left-hand side:
Click Advanced system settings
In the “Advanced system settings” window select “Environment Variables…” from the bottom part:
Open up Environment Variables
Now you can search for the “Path” entry in the lower part of the window called “System variables”. Here you should select the entry and click on “Edit…”. Now add the installation location of your Python to the end of this entry, and separate it with a semi-colon from the previous entries. For example I would enter the following:
C:\Python3\Scripts\;C:\Python3\
The Scripts folder under the Python installation contains pip so it is wise to add it to the PATH too.
System variables
Alternatively you can create an environment variable for your user only. In this case select “New…” in the upper part of the window called “User variables for …” and add a new entry where the Variable is set to “PATH” and the value is the location where you installed Python — the same as in the previous step.
User variables
Now if you open up a command line and enter python you should see something like the following command prompt:
Command prompt with Python
And this was it. Now you can access Python every time you open up a command line.
If you want to install python on other platform. You might like to see this article where we discuss about python install linux.