[05:28:36] [connected at Fri Nov 17 05:28:36 2006] [05:28:36] <> *** Looking up your hostname... [05:28:36] <> *** Checking ident [05:28:36] <> *** No identd (auth) response [05:28:36] <> *** Found your hostname [05:28:36] <> *** Your host is calvino.freenode.net[calvino.freenode.net/6667], running version hyperion-1.0.2 [05:28:37] [I have joined #peak] [08:38:35] ** Leira has joined us [08:38:43] ** Leira has left us [08:51:38] ** bitmvnch has left IRC () [08:55:39] ** bitmvnch has joined us [09:01:09] ** bitmvnch has left IRC () [09:02:44] ** bitmvnch has joined us [09:14:35] ** bitmvnch has left IRC () [12:08:49] ** bitmvnch has joined us [12:14:08] ** pje has joined us [13:22:36] ** bitmvnch has left IRC () [16:02:16] ** albino has joined us [16:05:09] Hello. I'm getting an interesting error message when trying to install and egg and I was hoping maybe one of you could point me in the right direction. It says "[Errno 2] No such file or directory: '/blah/blah/blah.pth' The installation directory you specified (via --install-dir, --prefix, or the disutils default setting) was: /usr/local/lib/python2.4/site-packages." Of course I didn't specify any command line setting and so I'm wondering where the default dis [16:23:37] Its compiled into Python [16:25:10] Where is your Python installation? [16:25:20] (specifically the libs [16:28:09] So is there some code I can write to print the path? [16:28:25] I was hoping to do something like import disutils; print disutils.defaultpath [16:28:59] They're all in /usr/lib/python2.4/ as they should be, I think the suse python maintainer screwed up when he built the rpm [16:30:29] just do setup.py install -d /usr/lib/python2.4/site-packages [16:30:58] Yeah, well I would like to get the problem fixed, this is a bug that needs to be filed with suse. [16:31:09] Is there a way to get the path with code from within python? [16:36:36] sys.path [16:36:50] python -c 'import sys; print sys.path' [16:37:06] hmm, I thought sys.path included all the paths to import stuff from [16:37:36] Yes [16:38:06] So how does disutils know which one of those paths to pick as its default? [16:38:35] Ahh, I see what you mean [16:39:53] That setting must be stored somewhere else, cause sys.path is correct for this machine, but when I try and install the egg I'm still getting that error [16:40:10] s/setting/path [18:06:29] albino? [18:07:06] FYI, the error appears to be that you are installing to a directory where you have no write privileges [18:13:14] pje: right, but it shouldn't be installing to that directory anyways, it should be using /usr/lib/python2.4/site-packages and not /usr/local/lib/python2.4/site-packages. That directory doesn't exist. So this is a bug against suse in my option and I want to fill out a bug report. But to do so and get a fix it sure would be nice to show python code that prints out that path. [18:13:26] s/option/opinion [18:13:49] interesting... it seems like they had to have patched the distutils to do that. [18:13:51] pje: Do you know where that path is stored? Somewhere within the disutils module? [18:14:15] distutils.command.install [18:14:34] See the INSTALL_SCHEMES dictionary [18:14:46] under 'unix_prefix' [18:15:52] hmm, now I feel dumb. At the interactive interpreter I'm not able to import any portion of disutils.command.install. I'm sure this shows that I know absolutely nothing about disutils. [18:16:09] the prefix (aka $base) comes from sys.prefix [18:16:29] did you do "from distutils.command.install import INSTALL_SCHEMES"? [18:16:36] pje: thanks [18:16:51] also, do "import sys; print sys.prefix" [18:17:00] as that value is used to establish the base location. [18:17:03] I get '/usr' for that [18:17:09] However, there are also distutils config files that can set it. [18:17:27] oh, I see the problem, disutils isn't included in the standard python package I have to also get python-devel [18:17:31] Like distutils.cfg in /usr/lib/python2.4/distutils [18:17:38] Yep. [18:18:09] Other config files include ~/.pydistutils.cfg, and setup.cfg in the directory where you're running easy_install or a setup.py [18:19:35] ahh, it helps if you spell distutils correctly also [18:21:30] What key am I looking for here? purelib or platlib? I'm guessing platlib (for platform library). [18:34:59] platlib is only used for non-pure (C) libraries [18:35:14] did you check sys.prefix? [18:35:33] 'cause if sys.prefix is /usr/local, even though it's installed in /usr/bin, then something's screwy. [18:35:37] Yeah, I got '/usr' back [18:35:49] okay, did you check for a distutils.cfg? [18:35:51] from sys.prefix [18:35:55] 'cause they might have it in there [18:35:57] * albino checks [18:36:04] /usr/lib/python2.4/distutils/distutils.cfg [18:36:37] oh yep, there it is [18:36:43] prefix=/usr/local [18:36:53] So fixing that should fix the issue [18:37:17] pje: Thanks very much [18:37:19] yep - and you can do that either there, or in your ~/.pydistutils.cfg [18:37:43] I need to learn distutils better, so I don't have to go ask questions all the time [18:37:45] presumably, they have it that way so that locally-installed stuff goes to /usr/local [18:38:03] so, you could of course also just create the /usr/local/... dir in question. [18:38:06] probably, but in that case I would think they would have created the directory [18:38:17] one might think. [18:38:32] I think that distutils actually creates it during normal installs though. [18:38:33] I'll at least file that as a bug and get them to go one way or the other [18:38:36] easy_install doesn't. [18:38:48] Oh, so maybe that's why they didn't create it [18:38:51] it insists on an existing install directory [18:38:53] I'm using easy_install of course [18:39:46] Darn, that means they're going to mark it WILL_NOT_FIX and you guys will get to deal with the fallout, that or maybe I'm the only one installing python stuff on SLES and SLED distributions [18:57:16] and doing it with easy_install, to a root-owned directory. :) [19:11:36] pje: Possible setuptools bug: http://trac-hacks.org/ticket/863#comment:3 [19:12:08] Seems to be causing issues with some Trac plugins [20:06:53] it's fixed in the setuptools trunk; use easy_install setuptools==dev06 to fix [22:14:41] ** pje has left IRC ("Client exiting")