How To Set Up Python in Windows
Installing Python 3.X
Microsoft Windows
doesn’t come with Python preinstalled as standard, so you’re going to have to
install it yourself manually. Thankfully, it’s an easy process to follow.
Step 1
Start by opening your web browser
to www.python.org/downloads. Look for the button detailing the download link
for Python 3.x.x (in our case this is Python 3.6.2 but as mentioned you may see
later versions of 3).
Step 2
Click the download button for
version 3.x, and save the file to your Downloads folder. When the file is
downloaded, double-click the executable and the Python installation wizard will
launch.
From here you have two choices:
Install Now and Customise Installation. We recommend opting for the Customise Installation link.
Step 3
Choosing the Customise option
allows you to specify certain parameters, and whilst you may stay with the
defaults, it’s a good habit to adopt as sometimes (not with Python, thankfully)
installers can include unwanted additional features. On the first screen
available, ensure all boxes are ticked and click the Next button.
Step 4
The next page of options include
some interesting additions to Python. Ensure the Associate file with Python,
Create Shortcuts, Add Python to Environment Variables, Precompile Standard
Library and Install for All Users options are ticked. These make using Python
later much easier. Click Install when you’re ready to continue.
Step 5
You may need to confirm the
installation with the Windows authentication notification. Simply click Yes and
Python will begin to install. Once the installation is complete the final
Python wizard page will allow you to view the latest release notes, and follow some
online tutorials.
Step 6
Before you close the install
wizard window, however, it’s best to click on the link next to the shield
detailed Disable Path Length Limit. This will allow Python to bypass the
Windows 260 character limitation, enabling you to execute Python programs
stored in deep folders arrangements. Again, click Yes to authenticate the
process; then you can Close the installation window.
Step 7
Windows 10 users will now find
the installed Python 3.x within the Start button Recently Added section. The first
link, Python 3.6 (32-bit) will launch the command line version of Python when clicked
(more on that in a moment). To open the IDLE, type IDLE into Windows start.
Step 8
Clicking on the IDLE (Python 3.6
32-bit) link will launch the Python Shell, where you can begin your Python
programming journey. Don’t worry if your version is newer, as long as it’s
Python 3.x our code will work inside your Python 3 interface.
Step 9
If you now click on the Windows
Start button again, and this time type: CMD, you’ll be presented with the Command
Prompt link. Click it to get to the Windows command line environment. To enter
Python within the command line, you need to type: python and press Enter.
Step 10
The command line version of Python
works in much the same way as the Shell you opened in Step 8; note the three
left-facing arrows (>>>). Whilst it’s a perfectly fine environment,
it’s not too user-friendly, so leave the command line for now. Enter: exit() to
leave and close the Command Prompt window.
0 Response to "How To Set Up Python in Windows"
Post a Comment