bug-gnubg
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-gnubg] missing os.path (linux)


From: Jim Segrave
Subject: Re: [Bug-gnubg] missing os.path (linux)
Date: Sun, 7 Dec 2008 13:10:48 +0100
User-agent: Mutt/1.5.16 (2007-06-09)

On Sun 07 Dec 2008 (01:21 +0800), steve berthiaume wrote:
> hello; i've installed gnubg-0.14.3+20060923-4 (deb package)  on my
> puppylinux 3.01 system, satisfied all dependencies, installed python, but
> still get this error:
> 
> # gnubg
> GNU Backgammon 0.16-develCopyright 1999, 2000, 2001, 2002, 2003, 2004 by
> Gary Wong.
> GNU Backgammon is free software, covered by the GNU General Public License
> version 2, and you are welcome to change it and/or distribute copies of it
> under certain conditions.  Type "show copying" to see the conditions.
> There is absolutely no warranty for GNU Backgammon.  Type "show warranty"
> for
> details.
> Could not find platform independent libraries <prefix>
> Could not find platform dependent libraries <exec_prefix>
> Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
> 'import site' failed; use -v for traceback
> Traceback (most recent call last):
>   File "/usr/share/gnubg/scripts/gnubg.py", line 52, in ?
>     import os.path
> ImportError: No module named os.path
> (No game)
> 
> 
> i don't know python, but i can see that a file os.path is missing, and it's
> nowhere on my hard drive.  what does this file do; do i create it myself,
> and will coming up with this file fix the other errors (could not find
> platform etc.) as well?
> 
> thanks; let me know what other info i can post!

os.path comes from a python module os.py (and/or os.pyc, which is the
byte-compiled version of os.py. These should be installed
when python was installed on your system. The first thing to try it to
bring up a terminal window and simply bring up python, then see if it
knows where to find os.py:

jes:/usr/home/jes$ python
Python 2.4.4 (#1, Sep 27 2008, 16:08:40) 
[GCC 4.1.2 (Gentoo 4.1.2 p1.0.2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import os

If you get no error messages, but simply a new prompt '>>>', then
os.py is installed and python should know where to find it. If you get
something like this (I used a name which would not exist, instead of
os and edited what is displayed):

>>> import os
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
ImportError: No module named os
>>> 

This would mean the module isn't installed and there's something very
wrong with the python installation on your machine.

If this works, type 

import sys
print sys.path

You will get a list of directories where Python looks for modules.

type ^D (Control D) to exit python

type this command to locate os.py:

find /usr -name os.py 2>/dev/null. This should tell you where os.py is found.

Next, start gnubg from this terminal window - simply enter gnubg. and
you should get the usual gui. 
Go to View->Panels->Command and turn this
window on. This creates a one line window 'Command' in the lower
right. In this window, type >>> (three greater than signs)
Now bring the terminal window where you started gnubg on top of the
board. You should see something like this:

=======================

jes:/usr/home/jes$ gnubg

GNU Backgammon 0.9.0

Copyright, 1999-2004 by Gary Wong, 2004-2008 GNU Backgammon is the
legal
property of its authors.

GNU Backgammon is free software, covered by the GNU General Public
License
version 3 or later, and you are welcome to change it and/or distribute
copies of it under certain conditions.  Type "show copying" to see the
conditions. There is absolutely no warranty for GNU Backgammon. Type 
"show warranty" for details.

Python supported.
SQLite database supported.
Window system supported.
External players supported.
XML match equity files supported.
Long RNG seeds supported.
3d Boards supported.
External commands supported.
Gstreamer sound system supported.
Multiple threads supported.
SSE supported and available.

(gnubg:16405): Pango-WARNING **: error opening config file
'/usr/home/jes/.pangorc': Key file contains line
'/usr/home/jes/pango.modules' which is not a key-value pair, group, or
comment

set gui showids on
(No game) (No game) >>>
Python 2.4.4 (#1, Dec 22 2007, 11:40:55) 
[GCC 4.1.2 (Gentoo 4.1.2 p1.0.2)]
>>> 

====================

Try typing the same 'import os' command here. If it fails, report what
it says

-- 
Jim Segrave           address@hidden






reply via email to

[Prev in Thread] Current Thread [Next in Thread]