Turbogears 2.0和Python 2.6

2024-04-29 07:24:57 发布

您现在位置:Python中文网/ 问答频道 /正文

我曾尝试在Windows 7和Windows XP上安装TurboGears 2.0和Python2.6,但都给出了相同的错误:

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?)

现在,根据主站点上的文档,TurboGears 2.0支持this page中的Python2.6:

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.

但他们从未在文档中提及这些步骤。在


Tags: inpyegglibpackageslinescriptsite
3条回答

关键是运行python设置.py开发.ini. 如果你只是跑设置.py开发.ini,它将使用已安装的python,并且不会向您的virtualenv乱扔垃圾

我也有同样的问题。我终于能让它工作了。我关闭了命令窗口。我打开了一个新的commandwindow并通过执行适当的激活.bat. 后来我重新执行了“设置.py最后,我能够像Turbogears wiki中记录的那样启动paster服务。在

你运行过python吗设置.py发展?(如错误信息所示)

I was using virtualenv as recommended in the documentation, but the develop command installs the packages in the original python folder.

好吧,这就是你的问题所在。我想知道你的评论“但是develop命令安装…”你的web应用的develop命令不应该安装任何东西。它只是为了建立数据库。在

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

相关问题 更多 >