Installation Error--pkg_resources.DistributionNotFound: TurboGears==0.9a6

200 views
Skip to first unread message

Matt Culbreth

unread,
Nov 10, 2006, 10:41:34 AM11/10/06
to TurboGears
Hello Folks,

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...

venkatbo

unread,
Nov 10, 2006, 12:11:12 PM11/10/06
to TurboGears

Matt Culbreth wrote:

> ...
>"/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

Doug Woos

unread,
Nov 10, 2006, 12:16:13 PM11/10/06
to turbo...@googlegroups.com
See if running usr/bin/tg-admin gives the same result. If it works, copy /usr/bin/tg-admin to /usr/local/bin/tg-admin and you should be all set.

Matt Culbreth

unread,
Nov 10, 2006, 4:21:40 PM11/10/06
to TurboGears
That seems to have done. I whacked out everything I could find that TG
might use, did it again, added
/Library/Frameworks/Python.framework/Versions/2.4/bin to my PATH and it
worked.

Thanks for the help!

jeffk

unread,
Nov 16, 2006, 4:13:21 PM11/16/06
to TurboGears
I'm having a similar problem running tg-admin, but the error is
regarding the PIL package. I've followed the suggestion to copy
tg-admin to /usr/local/bin/, with no effect.

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
(...)

Reply all
Reply to author
Forward
0 new messages