“Python Foot” graphic by David Day.

How To Install Python On Windows XP
Instead of being all things to all users, this little how-to assumes the following:
- You are a Windows XP user who is curious about computer programming;
- You would like to install the Python computer language on your Windows XP machine, start the Python interpreter, and run the classic “Hello World!” program.
If you have questions, like “What is Python and why should I install it on my Windows XP computer?” go read Why Python on Windows XP? Come back if you want to install Python.
Back already? Never left? Okay, proceed.
A company called ActiveState makes a free, all-in-one Python distribution that has everything you need to run Python on Windows XP, with all of the “hooks” you’ll eventually want to control your Windows machine and Windows programs using Python.
I don’t work for ActiveState. I am not an affiliate. There is no affiliate id or code in the link I provide to their site. I get no fee or percentage from them. I am not a computer expert, nor am I a computer scientist, just a Python fan.
Ready? Assuming you have cable or DSL, you are less than seven minutes away from having Python installed on your computer and typing your first command at the interpreter prompt. Go!
- Open another browser window (so you can keep reading this one) by pressing shift-and-click on the: ActivePython page of the ActiveState site.
- ActiveState can tell what type of computer you are using, so you should be seeing an icon that looks like this:
- Click on it! And Python should begin downloading.
- Make a note of where you download this file on your computer. It takes a few minutes to complete the download. Pass the time by watching the “Bring Out Your Dead” scene from The Holy Grail. Done? Okay, go find the ActivePython file on your computer.
- As of this writing, the file you downloaded is called “ActivePython-2.6.3.7-win32-x86.msi.” It’s about 31 megabytes, which is half the size of the last driver I installed for my Logitech Mouse.
- Double-click on the ActivePython file. (One user reports that on Vista you must acknowledge that the software maker is unknown.)
- Up pops the ActiveState box and tells you it’s going to install ActivePython. Click Next.
- Up pops the Licensing Agreement. Check the Accept box. Click Next.
- Up pops a dialogue box allowing you to customize the installation. Don’t customize it. Click Next.
- See the button that says “Install”? Click it.
- You’re done, and the ActivePython User Guide appears.
- Now go to START | All Programs | ActiveState ActivePython 2.6.
- The menu will break out into submenus. You want the one that says: “Pythonwin Editor.” Click on it.
- You are now at the command prompt of the Python interpreter and ready to speak Parseltongue.
- Your cursor will be blinking just to the right of a prompt that looks like this: >>>
- Type the following command there and make sure that “Hello World!” is inside quotation marks:
>>> print “Hello World!” - Press Enter. You should see Hello World! appear in a different-colored font on the line below.
- If so, you’re done!
You are inside the interpreter of the Pythonwin IDE (Integrated Development Environment). Leave the Python interpreter open, ready, and waiting to take your commands. Go to one of the following tutorials, which will teach you how to use the Python interpreter to learn Python:
- Learning To Program (if you’re in a hurry to type more commands into the interpreter, go straight to the “Simple Sequences” section of Professor Gauld’s justifiably famous tutorial).
- A Beginner’s Python Tutorial. Steven Thurlow wrote this simple, excellent tutorial for the modding community of Firaxis’ Civilization. Useful to beginners with little or no programming knowledge.
- A Tutorial For Non-Programmers Looking To Get Started With Python, a Wikibook by Josh Cogliati and several other contributors.
- How To Think Like A Computer Scientist, by Jeffrey Elkner, Allen B. Downey and Chris Meyers.
Once you become comfortable playing with the Python Interpreter, go to the BeginnersGuide/NonProgrammers page of the Python.org site and select more tutorials. There are plenty of good ones. All free!
Any Vista or Windows 7 users? You can help by leaving a note about any differences you encounter while following these instructions on Vista or Windows 7. So far it seems you must acknowledge that the publisher of the software is unknown? Thanks, rd
Later, when you start learning to program and have more questions, visit the Python Users Group at Google Groups and search it. Chances are your question has already been asked and answered. Also, when you need help remembering commands, refer to this excellent Python Quick Reference sheet. And be sure to visit the beautiful, new, SEARCHABLE Python documentation page from the busy geeks at Python.Org.
If you prefer learning from a good Python book, try one of these two written for beginners:
- Python Programming For The Absolute Beginner, by Michael Dawson;
- Python Visual Quickstart Guide, by Chris Fehily, also the author of the best, cheapest, and shortest SQL book ever written: SQL: Visual Quickstart Guide (3rd Ed).
After you acquire basic knowledge in Python, you can move onto some other great books:
- The Python Cookbook, 2nd Ed., by Alex Martelli, Anna Ravenscroft and David Ascher, which provides “recipes” for common tasks you might like to accomplish using Python on your computer. For many people, this is the best way to learn code, by studying examples contained in programs that do useful work.
- Learning Python, 3rd Ed., by Mark Lutz, commonly considered the most thorough introduction to the language for beginners, now out in a new 3rd edition that covers Python 2.5 and looks ahead to Python 3.0.
- Python: Essential Reference, 3rd Ed., by David M. Beazley. This is the newest of the Python books and probably the best all-around Python book, but newbies may find it overly terse. Beazley wastes no words and has a tight, crisp writing style. If you are already familiar with basic programming concepts, but are new to Python, Beazley is your man.
In my most recent book, Rapture For The Geeks: When AI Outsmarts IQ, I argue that Python should be declared the Official Language of The Singularity. If you agree, cast your vote by leaving a comment below.
Rapture For The Geeks also includes an Emily Dickinson poem translated into the Python programming language by Python experts Alex Martelli and Anna Ravenscroft (see page 196 of Rapture).
Have fun!
Richard Dooling



{ 1 trackback }
{ 120 comments… read them below or add one }
← Previous Comments
thanx man thats awesome … i would never have done it that fast
Nice, Thanks for the intro
Nice and updated installation guide, thanks
Thanks!! This worked great – and was fun to read. I was on Vista and except for one additional message, it was perfect. Note: That additional message was when I double clicked on the msi, I had to acknowledge something to the effect that the publisher of this software was unknown.
Thanks again,
R
Richard,
This is very motivating. Thanks for making it look so simple
Good tutorial!
Also, version 2.6 of python is out. (The version I downloaded).
And further more, you are awesome. You should try get a holiday named after you.
wow. That was a fair amount of links in one small paragraph. You wouldn’t happen to edit wikipedia, would you?
The only reason I have Microsoft Word on my computer is because my mum wanted to look at some files that were for specifically Microsoft Word. (I’m 16, if you were wondering about me living with my mum). Otherwise I would have never bothered with it. (I use it at school, I don’t really like it much. It’s a pity that they don’t offer anything else).
Thanks for the info, I will take it under consideration.
Dear Flesh:
Some might say that you can use Microsoft Word as a text editor, but you are better off using Notepad or WordPad. I haven’t used Windows for years (I’m on Linux and Mac OS X). There are literally hundreds of excellent free text editors to choose from, no matter what your operating system. I prefer Vim myself, but it takes a bit of learning to operate, like any powerful tool. Learn more about text editors at Wikipedia.
Hello, world!
I just downloaded Python! It took me about 6 hours to download. (I live out in the middle of nowhere and the phone lines can’t handle broadband out here, so I’m stuck on slow dial up).
To the guy above who is using Mozilla, did you left click or right click? I had a problem like that when I tried to download something ages ago. It’s best just to left click on it.
Is Microsoft Word a good text editor to write python code in? (I also have Notepad and Wordpad if either of those are better to use)
Oh yeah, and thanks for all the help!
~Flesh
I now think I know why python didn’t install.
I used Mozilla and the installation box didn’t appear. Instead Mozilla download box appeared.
It didn’t install… Probably because I was installing two things at once.
Whoops, didn’t say thank you. Thank you, Richard Dooling!
Didn’t time it. I used this one because the newest one was too hard
. Hooray for older versions of stuff!
Audra,
I think you are possibly confusing two or maybe three things: (1) running a file that contains Python code; (2) editing such a file; and (3) interacting with the Python interpreter. When you say that you have “downloaded certain files that require python editor,” what does this mean? If these files are Python scripts or modules, then you would run them using Python, but you would edit them with any text editor.
I think you should continue with the tutorials I linked to until you grok the differences, then set up your particular environment to run the files you downloaded. Pay particular attention to editing, saving, and running your OWN simple beginning script using one of the tutorials, and then it will become clear how to run some other Python program that you downloaded.
I can’t really provide support here, but once you have a little bit more knowledge you can post to:
http://groups.google.com/group/comp.lang.python
And someone will help you.
Thanks,
RD
Thank you so much for making python understandable. I had downloaded it (the zip version) but after unzipping, was at a standstill. Now, that you have successfully talked me through opening up Python Interpreter, how the heck do I use it? I happen to have some certain downloaded files which require python editor–so now how do I get the files to the interpreter? If I just click on them, I get a message they require python interpreter–duh! Help–for the semi (or mostly) computer illiterate.
This is perfect for people like me who don’t actually want to use Python but need it installed to run Blender’s python scripts. Just an FYI for anyone else installing Python for Blender…you must use the older version of Python that Blender recommends, Blender won’t recognize newer versions of Python. Happy sculpting!
I am new to the Python and i think the information given by you will help me to learn more about Python.
thanks!!!
Thank you Richard I’ll go and poke around over there.
Sammy
Sammysnake:
A perfect question for the Python Google Group:
http://groups.google.com/group/comp.lang.python
Usual answer is neither. Leave the present Python installation in place. If you want or need a new version, just install it separately. You can summon either version as needed. Your system may use or require the old one just to function, so don’t tamper with it.
RD
I have a HP computer that came with python installed on it and it is a very old version. I’m just now looking into messing around with python and was wondering if I need to uninstall what is on my system or just install over the top of it the newer version. Any suggestions?
i WOULD LIKE TO BUY dvd BUT THE LINK DO NOT WORK
Kyle,
Your question is a perfect one for the comp.lang.python google group. You’ll get a wide variety of opinions and responses, and they may also ask for more specifics from you about what kind of programs, etc. But that would be my first choice for a broad question like yours:
http://groups.google.com/group/comp.lang.python/topics
Good luck,
Awesome site Richard!
I have been running searches all over the net looking for python tutorials that focus more on scripting programs. Most of what i found sticks to the “print” and variable tutorial basis. Do you know of a site that a person can start learning creating actual programs?
Kind Regards,
Kyle
This worked great for me (WXP+SP2) and can use LastFMProxy not just in Linux
http://www.last.fm/group/LastFMProxy
Thanks…..
Thanks for your site. The download process was both educational and functional. Much appreciated.
I have installed Python 2.3.5 on my windows XP computer and when I open IDLE (Python GUI) nothing happens. What should I do
Hi ! its a great tutorial on python .. could you please let me know what is the basic advantage of using python over java. is it fast or more convinient to code .. we have some daily jobs which are written in pyhton but the thing is we have lot of people having java skills and no one with python . so is there anything special in python for which we should ask java developer to learn and code in python
Thank you for this. You have saved me a lot of trouble.
Well, here I go…
This helped me a lot. Thank you.
I hypothesized the following:
Download procedures are very simple when described with patience, care and concern for their users.
I believe you’ve proved it.
Thanks – Randy
Just wanted to say thank u for your help in my quest to be free.
Thanks.Reading your tutorial I setup pyton successfully.I was looking for tutorials explaining how setup this program,and I didn’t find anyone easy.I though I never succed,but I did.Now I’m following the tutorial recomended by you,alan gauld’s.
i like this site…thank you…
Jack,
I use Linux and Mac OS X, but I’ll check on a Windows machine tomorrow. You can use the interpreter inside PythonWin just fine. Or open a command prompt, like C:\> and type “python” and press return. That too should give you a Python interpreter.
As I say, I’ll check myself tomorrow on a Windows machine.
RD
Hi Rich,just ran the pythonwin program and it seems i can’t find the related python idle program on my pc, it only shows pythonwin, python interactive shell,python documentation and and python reinstallation(modify,etc) on my startup.Is there a way to fix this or did i download the wrong version?
Thanks a million for this easy step-by-step guide. The options on the main download page were daunting for this novice.
Thank you very much
.
There is lots of good information out there. However, it is very rare to find something as readable, accurate, and time-efficient as this guide. Sure wish I had found this site the first time I went paddling in the python pool.
Looking for a tagline for your site? How about, “Learning should be a joy, not a task.”
This actually works. Thanks!
Awesome help here, THANKS MATEY.
I’d write you a letter and post it but I think that would be a bit weird. but I like sending letters.
Thanks for writing this though. GOOD JOB, SIR.
Awesome! I am teaching my 11 year old son to program and your 7 minutes to Hello World made getting python up and running super simple. He just let me back on the PC after about 4 hours of raw_input’s and print commands… Thanks!
I’m having some problems once I’ve installed the ActivePython. I can access the shell quite fine, but opening the PythonWin Editor gives me this error message and doesn’t open anything up/can’t start a new file/can’t do anything:
File “C:\Python25\Lib\site-packages\pythonwin\pywin\framework\intpyapp.py”, line 171, in InitInstance
import interact
File “C:\Python25\Lib\site-packages\pythonwin\pywin\framework\interact.py”, line 8, in
import code
: (‘invalid syntax’, (‘code.py’, 9, 25, ‘if__name__ == “__main__”: web.run(urls, globals())\n’))
Any ideas?
hello I been learning python by a month now, am reading the book “python programming on win32″ by mark hammond, but this book is very old a some of the examples are easy to understand and others not so easy, most of the problem are in the parts of COM, using de excel, word and visual basic stuff, a have being writing the code of the book and it even donwload the examples, but we i run then, most of then nothing hapends even wen in the book saids the oposite , if some could help me, i have python 2.5 on windows xp, and i beginning to wonder if this is the problem
Thanks for your help.
It’s agreat job
Thanks so much!!! I really wanted to start python… and just been really lazy. But this was really great !!! Thanks again
Why are you trying to get people to get Python from a different site than the original python site? Python kicks some butt, and has a lot of functions, and I would rather be safe using it from the creator’s site, because if NASA can trust it, so can I!
Besides “Hello World!” isn’t hard at all:
code: print “Hello World!”
Thanks a lot
Thanks!!
Professor Gauld left a note on comp.lang.python (google group) saying he was having hosting problems and had copied everything to a temporary server.
Try this:
http://uk.geocities.com/alan.gauld@btinternet.com/
rd
← Previous Comments