Scroll down to find the latest version of Python 2.7, and click the blue Download link, as shown at the bottom of the image below.
On the next page, click the appropriate Windows installer for your system, either 32-bit or 64-bit.
Double-click the downloaded file.
In the "Select whether to install Python 2.7.13 for all users of this computer" window, accept the default option to "Install for all users" and click Next".
TroubleshootingIf the installer file won't open, try these actions:
- Right-click the file and click Properties. At the bottom of the Properties sheet, click Unblock.
- Launch the installer from a Command Prompt, not from the GUI
In the "Select destination directory" window, accept the default directory and click Next".
In the "Customize Python 2.7.13" window, scroll to the bottom of the list, click the arrow next to "Add python.exe to Path", and click "Entire feature will be installed on local hard drive", as shown below.
In the "Complete the Python 2.7.13 Installer" window, click Finish".
You should see Python launch, as shown below, but it usually does not, because the Python installer doesn't work correctly. If that happens, follow the instructions in the Troubleshooting box below.
TroubleshootingIf python won't launch, you can fix it with an Administrator Command Prompt window.
Click Start (on Windows 8, press the Windows Logo key on your keyboard) and type this search term:When Windows finds "Command Prompt", right-click it and click "Run as administrator".
If a "User Account Control" box appears, click Yes.
In the Administrator Command Prompt window, execute these commands, as shown below.
cd c:\Windows mklink /H python.exe c:\python27\python.exe
Your machine is now ready to do simple Python projects, such as the ones in the Violent Python book.
In the Administrator Command Prompt window, execute these commands:
The steps should complete without errors, as shown below.
pip install pycryptodome python from Crypto.Cipher import AES