Guide to installing Python in Windows Vista

From Neural Wiki

Jump to: navigation, search

Currently, the Python Windows installer works very nicely with Windows XP. Once you download and install the program in XP everything is ready to go including the command prompt call. That is to say, by typing Python at the command prompt Python starts. This is something I consider essential for my day to day operation. However, when you install in Windows Vista, typing Python in the command prompt does not start the program. Below I have given my remedy to this problem. In the future, these steps may not be necessary, as the Python Windows Installer is updated for Vista. To check whether this is necessary, download Python, install it, and then type Python into the command prompt. If it starts, then you do not need to worry about the following steps.

[edit] Download Python

If you plan on using IDLE (Python's GUI editor) you need to turn off the user account controls first. See Setting up apache and php in vista. If you will be using something like VIM or EMACS for editing then don't worry about this step.

Click here to download Python 2.5 for Windows. Open it up and it will install automatically with a few button clicks. I installed mine in the default location of c:\Python25. There is a new version out now, but I have not yet installed Python 2.6 or 3.0 in Vista because Scipy (really awesome python module) is not yet ready for either version. However, the installation instructions for 2.6 and 2.5 should be the same though I have not verified this.

[edit] Setting up Python in Vista

Fig 1
Fig 1
Fig 2
Fig 2
Fig 3
Fig 3
  • NOTE: If you installed Python and IDLE does not work, then turn off user account controls and reinstall Python.

1. First go to the Windows button, and open control panel (Fig 1). You will need the classic view which is in the upper left hand corner (Fig 2)

2. Click the System icon (Fig 2)

3. Click on the Advanced system settings which is in the upper left hand corner (Fig 3)

4. Once this opens, click the Advanced tab (Fig 4)

4a. Click the Environment Variables button (Fig 4A)

4b. In the second box labeled System variables, scroll down to the variable called Path and double click on this (Fig 4B)

4c. pt 1 You will need to add some text to this box. NOTE: Do not delete what is already there!!. Add C:\Python25; to the front of the existing string. Then press Ok and its ready to go. It should look something like C:\Python25;%\...........

4c pt 2 Some people have reported that they need to put the C:\Python25 in quotes...ex "C:\Python25"; I did not need to do this, but if pt 1 doesn't work, try quotes.

5. To test whether it worked, open the command prompt, and type in Python at the command prompt. Python should start.

6. As a side note, sometimes you have to restart before it will work

Fig 4
Fig 4

If you are still having trouble, please feel free to check out the new neuralwiki bulletin board on the topic

[edit] Making Python Programs

To make python programs you will need a code editor. You can use IDLE which comes with Python. However, I am a huge fan of VIM (Installing VIM), but there is a learning curve. Additionally, many people like EMACS which is a bit easier to use at first (Installing EMACS). EMACS was my first code editor and it is not a bad one. That said, if you want to impress the opposite sex, become instantly more attractive and a better programmer, I recommend VIM.

Personal tools