paster 快速入门不可选项

0 投票
1 回答
1077 浏览
提问于 2025-04-17 04:39

我正在Windows 7上安装TurboGears2,并且是在一个虚拟环境中运行(使用的是python 2.7)。当我运行

paster --help

时,我没有看到paster quickstart这个选项。

相反,我得到了这样的输出:

(VirtualEnv_1) C:\VirtualEnv_1\Scripts>paster --help
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

Commands:
 create       Create the file layout for a Python distribution
 help         Display help
 make-config  Install a package and create a fresh config file/directory
 points       Show information about entry points
 post         Run a request for the described application
 request      Run a request for the described application
 serve        Serve the described application
 setup-app    Setup an application, given a config file

TurboGears2:
 tginfo       Show TurboGears 2 related projects and their versions

所以,当我运行:

(VirtualEnv_1) C:\VirtualEnv_1\Scripts>paster quickstart

时,我得到了:

Command 'quickstart' not known (you may need to run setup.py egg_info)
Known commands:
  create       Create the file layout for a Python distribution
  exe          Run #! executable files
  help         Display help
  make-config  Install a package and create a fresh config file/directory
  points       Show information about entry points
  post         Run a request for the described application
  request      Run a request for the described application
  serve        Serve the described application
  setup-app    Setup an application, given a config file
  tginfo       Show TurboGears 2 related projects and their versions

我想问的是:为什么这个选项会缺失,我该怎么才能得到它呢?

1 个回答

1

你会遇到这种情况,是因为你安装了运行TurboGears应用所需的包(TurboGears2),但没有安装开发TurboGears应用所需的包(tg.devtools)。

在你的虚拟环境中运行下面的命令,就可以安装正确的包:

easy_install -i http://www.turbogears.org/2.1/downloads/current/index tg.devtools

撰写回答