Python on Windows
Hi ya’ll,
So in my previous post I wrote about the PyCon Namibia 2016 conference that took part from 25 – 29 January 2016.
I had some people actually send me e-mails asking on how to install Python on Windows. And this post will give a short way to install and start using Python on Windows.
The following steps assume that you have internet access on your laptop and that you have administrative privileges on the computer you wish to install Python on.
Additionally it also assumes that you know a little about basic systems administration on Windows or at the very least a power user.
LEGO!!
FYI: This only works for Windows 7 and newer versions
To install Python on Windows:
- Go to The Python.org website under Downloads and Download the Windows executable installation file
- Get the 2.7.x version although there are developers that are trying to push for the 3.x versions, I still feel that the latest version might not be as stable (then again me likes 2.7)
- Once the download is complete:
- Double click on the executable file to install
- Make sure to acknowledge the Windows security prompt
- Go through the wizard leaving all settings to their defaults
- Once installation is complete, click finish
- Python is installed on your Windows Operating system.
So now that you have install Python you are wondering how do I do the basic tutorials to learn the language?
Well you need to use the command prompt. To open command prompt:
Now that you have the command prompt open type “python” (without the quotation marks).
You will get an error, this is because to command prompt does not have the environmental variable to run python from it.
To solve this and make sure you can use python via command prompt edit the environmental variables, as follows:
- Press Windows + X
- Select System
- Select Advanced system settings (on your left, under Control Panel Home)
- Under the advanced tab, select Environmental Variables (at the very bottom of the system properties window).
- If you don’t have the path already available, create one else edit the existing one.
- To create a new User Variable
- Click on New
- Enter a Variable name: “path”
- Enter the Variable value: “C:WindowsSystem32;C:Python27;C:Python27python.exe;C:Python27Scripts;C:Python27Libsite-packagesdjangobin;“
Laterz,
G!
WOW I really need to update this post or rather just write a completely new guide.