0

I've tried to install TurboGears 2.0 with Python 2.6 on both Windows 7 and Windows XP, but both give the same error:

File "D:\PythonProjects\tg2env\Scripts\paster-script.py", line 8, in <module>
load_entry_point('pastescript==1.7.3', 'console_scripts', 'paster')()
File "D:\PythonProjects\tg2env\lib\site-packages\pastescript-1.7.3-py2.6.egg\paste\script\command.py", line 73, in run
commands = get_commands()
File "D:\PythonProjects\tg2env\lib\site-packages\pastescript-1.7.3-py2.6.egg\paste\script\command.py", line 115, in get_
plugins = pluginlib.resolve_plugins(plugins)
File "D:\PythonProjects\tg2env\lib\site-packages\pastescript-1.7.3-py2.6.egg\paste\script\pluginlib.py", line 81, in res
pkg_resources.require(plugin)
File "D:\PythonProjects\tg2env\lib\site-packages\setuptools-0.6c9-py2.6.egg\pkg_resources.py", line 626, in require
File "D:\PythonProjects\tg2env\lib\site-packages\setuptools-0.6c9-py2.6.egg\pkg_resources.py", line 524, in resolve
pkg_resources.DistributionNotFound: zope.sqlalchemy>=0.4: Not Found for: City_Guide (did you run python setup.py develop?)

Now, according to the documentation on the main site, TurboGears 2.0 supports Python 2.6 in this page:

TurboGears works with any version of python between 2.4 and 2.6. The most widely deployed version of python at the moment of this writing is version 2.5. Both python 2.4 and python 2.6 require additional steps which will be covered in the appropriate sections.

But they never mention those steps in the documentation.

4

3 回答 3

1

你运行 python setup.py develop 了吗?(如错误消息所述)

我按照文档中的建议使用 virtualenv,但是开发命令将包安装在原始 python 文件夹中。

好的,这就是你的问题的原因。我想知道您的评论“但是开发命令安装......”您的网络应用程序的开发命令不应该安装任何东西。它只是为了设置数据库。

您是否在 Web 应用程序的目录中运行此命令?

于 2009-10-08T08:44:16.027 回答
0

我有同样的问题。我终于能够让它工作了。我关闭了命令窗口。我打开了一个新的命令窗口并通过执行相应的 activate.bat 来激活 virtualenv。之后我重新执行“setup.py develop”,最后我能够开始粘贴服务,如 Turbogears wiki 中所述。

于 2010-03-03T19:23:29.077 回答
0

关键是运行python setup.py development.ini。如果您只是运行 setup.py development.ini,它将使用已安装的 python,并且不会乱扔到您的 virtualenv

于 2010-05-14T20:32:44.717 回答