I'm trying to install TurboGears 1.0b on my MacBookPro. I've
previously done this and it works, but I'm problems this time.
I follow the base instructions (download tgsetup.py, run it) and it
seems to work. However when I type "tg-admin" I get the following
stack trace:
Traceback (most recent call last):
File "/usr/local/bin/tg-admin", line 5, in ?
from pkg_resources import load_entry_point
File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/setuptools-0.6c3-py2.4.egg/pkg_resources.py",
line 2482, in ?
for dist in working_set.resolve(
File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/setuptools-0.6c3-py2.4.egg/pkg_resources.py",
line 483, in resolve
raise DistributionNotFound(req) # XXX put more info here
pkg_resources.DistributionNotFound: TurboGears==0.9a6
Any ideas here? I've wiped my system a few times of setuptools and TG
but to no avail. It's got to be something easy...
> ...
>"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/...
> ...
> Any ideas here? I've wiped my system a few times of setuptools and TG
> but to no avail. It's got to be something easy...
In
...../lib/python2.4/site-packages/
'am assuming you:
. deleted all TG related .egg files and folders
. deleted all TG related entries in easy-install.pth
or removed it all together.
Have a feeling its using the TG 0.9a6 entry in the .pth file
or some such.
/venkat
Thanks for the help!
What is turbogears' tg-admin (or setuptools), asking for with this
error message?
$ /usr/bin/tg-admin --help
Traceback (most recent call last):
File "/usr/bin/tg-admin", line 7, in ?
sys.exit(
File
"/usr/lib/python2.4/site-packages/setuptools-0.6c3-py2.4.egg/pkg_resources.py",
line 236, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File
"/usr/lib/python2.4/site-packages/setuptools-0.6c3-py2.4.egg/pkg_resources.py",
line 2097, in load_entry_point
return ep.load()
File
"/usr/lib/python2.4/site-packages/setuptools-0.6c3-py2.4.egg/pkg_resources.py",
line 1830, in load
entry = __import__(self.module_name, globals(),globals(),
['__name__'])
File "/software/svn/turbogears/turbogears/__init__.py", line 21, in
?
ext = entrypoint.load()
File
"/usr/lib/python2.4/site-packages/setuptools-0.6c3-py2.4.egg/pkg_resources.py",
line 1829, in load
if require: self.require(env, installer)
File
"/usr/lib/python2.4/site-packages/setuptools-0.6c3-py2.4.egg/pkg_resources.py",
line 1842, in require
working_set.resolve(self.dist.requires(self.extras),env,installer))
File
"/usr/lib/python2.4/site-packages/setuptools-0.6c3-py2.4.egg/pkg_resources.py",
line 483, in resolve
raise DistributionNotFound(req) # XXX put more info here
pkg_resources.DistributionNotFound: PIL>=1.1.5
The individual components are working well enough, and turbogears has
generally worked with this configuration in the past. I use Gentoo
Linux' system package for PIL and a few other packages, setuptools for
everything else. Some environment info:
/usr/lib/python2.4/site-packages # ls *.pth
Numeric.pth PIL.pth dbus.pth easy-install.pth pygtk.pth
setuptools.pth wx.pth
/usr/lib/python2.4/site-packages # cat PIL.pth
PIL
/usr/lib/python2.4/site-packages # cat easy-install.pth
import sys; sys.__plen = len(sys.path)
./setuptools-0.6c3-py2.4.egg
/software/svn/turbogears
/software/svn/sqlalchemy/lib
/software/svn/pyyaml/lib
./ipython-0.7.2-py2.4.egg
./nose-0.9.0-py2.4.egg
(...)
import sys; new=sys.path[sys.__plen:]; del sys.path[sys.__plen:];
p=getattr(sys,'__egginsert',0); sys.path[p:p]=new; sys.__egginsert =
p+len(new)
/software/svn/turbogears $ svn info
URL: http://www.turbogears.org/svn/turbogears/trunk
Revision: 2078
(...)
# equery files imaging
* Contents of dev-python/imaging-1.1.5:
(...)
/usr/lib/python2.4/site-packages/PIL
/usr/lib/python2.4/site-packages/PIL.pth
/usr/lib/python2.4/site-packages/PIL/ArgImagePlugin.py
(...)