Latest Version: 0.9.6.1
  Dashboard > Pylons Official Docs > Home > Windows Notes
  Pylons Official Docs Log In | Sign Up   View a printable version of the current page.  
  Windows Notes
Added by Philip Jenvey, last edited by Philip Jenvey on Jun 28, 2007
Labels: 
(None)

Python scripts installed as part of the Pylons install process will be put in the Scripts directory of your Python installation, typically in C:\Python24\Scripts. By default on Windows, this directory is not in your PATH; this can cause the following error message when running a command such as paster from the command prompt:

1
2
3
C:\Documents and Settings\James>paster
'paster' is not recognized as an internal or external command,
operable program or batch file.

To run the scripts installed with Pylons either the full path must be specified:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
C:\Documents and Settings\James>C:\Python24\Scripts\paster
Usage: C:\Python24\Scripts\paster-script.py COMMAND
usage: paster-script.py [paster_options] COMMAND [command_options]

options:
  --version         show program's version number and exit
  --plugin=PLUGINS  Add a plugin to the list of commands (plugins are Egg
                    specs; will also require() the Egg)
  -h, --help        Show this help message

... etc ...

or (the preferable solution) the Scripts directory must be added to the PATH as described below.

For Win2K or WinXP

  1. From the desktop or Start Menu, right click My Computer and click Properties.
  2. In the System Properties window, click on the Advanced tab.
  3. In the Advanced section, click the Environment Variables button.
  4. Finally, in the Environment Variables window, highlight the path variable in the Systems Variable section and click edit. Add or modify the path lines with the paths you wish the computer to access. Each different directory is separated with a semicolon as shown below:
1
C:\Program Files;C:\WINDOWS;C:\WINDOWS\System32
  1. Add the path to your scripts directory:
1
C:\Program Files;C:\WINDOWS;C:\WINDOWS\System32;C:\Python24\Scripts

See Finally below.

For Windows 95, 98 and ME

Edit autoexec.bat, and add the following line to the end of the file:

1
set PATH=%PATH%;C:\Python24\Scripts

See Finally below.

Finally

Restarting your computer may be required to enable the change to the PATH. Then commands may be entered from any location:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
C:\Documents and Settings\James>paster
Usage: C:\Python24\Scripts\paster-script.py COMMAND
usage: paster-script.py [paster_options] COMMAND [command_options]

options:
  --version         show program's version number and exit
  --plugin=PLUGINS  Add a plugin to the list of commands (plugins are Egg
                    specs; will also require() the Egg)
  -h, --help        Show this help message

... etc ...

All documentation assumes the PATH is setup correctly as described above.

Note to others - you can't run any of the paste commands in a non-admin account on Windows.

Posted by Lance Good at Oct 28, 2007 01:23 | Permalink

Binaries for the simplejson extension can be found in the TurboGears SVN:

http://svn.turbogears.org/site_resources/eggs/

Posted by Matt Schmidt at Nov 12, 2007 14:58 | Permalink
Site running on a free Atlassian Confluence Open Source Project License granted to Pylons. Evaluate Confluence today.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.3.3 Build:#645 Feb 13, 2007) - Bug/feature request - Contact Administrators
Top