views:

427

answers:

3

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.

+1  A: 

did you run python setup.py develop? (as the error message says)

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

Okay, that is the cause of your problems. I'm wondering about your comment "but the develop command installs..." The develop command of your web app shouldn't install anything. It's just meant to set up the database.

Are you running this command inside the directory of your web app?

Aaron Digulla
Yes, I did, I was following the tutorial in the site documentation.I found out the problem but I couldn't find out how to solve it. I was using virtualenv as recommended in the documentation, but the develop command installs the packages in the original python folder. When I tried using --prefix it said that the selected folder is not on PYTHONPATH and doesnot supprt .pth files.
AKSK
A: 

I had the same problem. I was finally able to get it to work. I closed the command window. i opened a new commandwindow and activated the virtualenv by executing the appropriate activate.bat. Afterwards I reexecuted "setup.py develop" and finally i was able to start paster serve as documented in the Turbogears wiki.

Bernhard Kircher
A: 

The key is to run python setup.py development.ini. If you just run setup.py development.ini, it will use the installed python, and will not litter to your virtualenv

pihentagy