Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
platform variable in emerge, giving me problems
View unanswered posts
View posts from last 24 hours

 
This topic is locked: you cannot edit posts or make replies.    Gentoo Forums Forum Index Gentoo for Mac OS X (Portage for Mac OS X)
View previous topic :: View next topic  
Author Message
mas
n00b
n00b


Joined: 19 Oct 2004
Posts: 2
Location: LA

PostPosted: Tue Oct 19, 2004 3:50 am    Post subject: platform variable in emerge, giving me problems Reply with quote

Hi I've been reading the forum and theres some talk about problems like this:

Traceback (most recent call last):
File "/usr/lib/portage/bin//emerge", line 6, in ?
import os,sys,platform
ImportError: No module named platform

I installed 10.2.8 and installed gcc updater(gcc 3.3) with the dec. 2003 dev tools. I still get this problem when I try to emerge anything. I haven't installed fink or any other package management system and I haven't messed with any of the files in /etc. can anyone help or is portage not for 10.2.8?

Also where does python go to import 'os', 'sys' and 'platform'?
Back to top
View user's profile Send private message
vandahm
n00b
n00b


Joined: 30 Aug 2002
Posts: 7
Location: Spartanburg, SC

PostPosted: Tue Oct 19, 2004 10:52 am    Post subject: Reply with quote

mas wrote:
Hi I've been reading the forum and theres some talk about problems like this:

Traceback (most recent call last):
File "/usr/lib/portage/bin//emerge", line 6, in ?
import os,sys,platform
ImportError: No module named platform

I'm using OS 10.3.5 (Panther) and Portage version 2.0.51_rc9. The emerge script doesn't appear to use a platform module at all:
Code:
# emerge --version
!!! Relying on the shell to locate gcc, this may break
!!! DISTCC, installing gcc-config and setting your current gcc
!!! profile will fix this
Portage 2.0.51_rc9 (default-macos-10.3, gcc-3.3, libsystem-7.1-r0, 7.5.0 Power Macintosh)
#  head -n 10 `which emerge`
#!/usr/bin/python -O
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-src/portage/bin/emerge,v 1.339 2004/10/11 04:01:00 jstubbs Exp $

import os,sys
os.environ["PORTAGE_CALLER"]="emerge"
sys.path = ["/usr/lib/portage/pym"]+sys.path

import portage
# egrep platform `which emerge`
#

Perhaps you should somehow attempt to get a different version of the Portage utilities, although I don't know how you can do this without first having a working version of the Portage utilities.

mas wrote:
Also where does python go to import 'os', 'sys' and 'platform'?

The os, sys, and platform modules are shipped with Python (at least with Python version 2.3) and can be found in the same place as all the other modules that come with Python. On my Gentoo Linux machine, they are in /usr/lib/python2.3/, and on Macintosh OS X 10.3.5, they are located in /System/Library/Frameworks/Python.framework/Versions/Current/lib/python2.3/. Since you're running Jaguar, the module directory might be in a different location. If so, try this:
Code:
$ for i in /System/Library/Frameworks /usr/lib /usr/local/lib; do
> [ -d $i ] && find $i -name os.py
> done

If there is no platform.py file in your Python directory and you're the gambling type, you're welcome to grab mine.

Take care,

Steve
_________________
Steve VanDahm
Spartanburg, South Carolina, USA
Back to top
View user's profile Send private message
mas
n00b
n00b


Joined: 19 Oct 2004
Posts: 2
Location: LA

PostPosted: Wed Oct 20, 2004 3:42 pm    Post subject: I installed python2.3 for OS X Reply with quote

I used the installer from the python webpage that is for OS X and it installed all the modules in the directory you said it would (/System/Lib.. etc ) but no platform mod. So I went back to pythons webpage and downloaded the tar.gz and everything compiled just fine and installed in /usr/local/lib. But now I don't how to get OS X to look in /usr/local/lib to find python2.3. how do you find the LD_LIBRARY_PATH or the DYLD_LIBRARY_PATH? All I can tell is that it has to be defined in the .profile file in $HOME. I type 'echo $DYLD_LIBRARY_PATH' and bash says i don't have that environment variable. So can I just put that in my .profile and OS X will start looking in my /usr/local/lib or can I just link /usr/local/lib/python2.3 to /usr/lib/python2.3? emerge still doesn't find the platform mod even though its in /usr/local/lib.
Back to top
View user's profile Send private message
Display posts from previous:   
This topic is locked: you cannot edit posts or make replies.    Gentoo Forums Forum Index Gentoo for Mac OS X (Portage for Mac OS X) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum