gnucash/python problem

John Thompson John.Thompson@attglobal.net
Mon, 1 Oct 2001 21:30:59 -0500 (CDT)


I just went and updated my working gnucash-1.6.2 to v1.64 and now appear
to have completely hosed gnucash:

[john@starfleet john]$ gnucash
/home/john/.gtkrc:1: error: unexpected character `\37', expected keyword -
e.g. `style'
/home/john/.gtkrc:1: error: unexpected character `\37', expected keyword -
e.g. `style'
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
Fatal Python error: couldn't import os
Aborted

OK, fine, I thought, I'll just reinstall the old version.  Guess what
kiddos: now the old version dies with the same error.  So I try running
"python -v" as suggested in the error message:

[john@starfleet john]$ python -v
# /usr/lib/python2.2/site.pyc matches /usr/lib/python2.2/site.py
import site # precompiled from /usr/lib/python2.2/site.pyc
# /usr/lib/python2.2/os.pyc matches /usr/lib/python2.2/os.py
import os # precompiled from /usr/lib/python2.2/os.pyc
import posix # builtin
# /usr/lib/python2.2/posixpath.pyc matches /usr/lib/python2.2/posixpath.py
import posixpath # precompiled from /usr/lib/python2.2/posixpath.pyc
# /usr/lib/python2.2/stat.pyc matches /usr/lib/python2.2/stat.py
import stat # precompiled from /usr/lib/python2.2/stat.pyc
# /usr/lib/python2.2/UserDict.pyc matches /usr/lib/python2.2/UserDict.py
import UserDict # precompiled from /usr/lib/python2.2/UserDict.pyc
Python 2.2a3 (#1, Sep 24 2001, 16:07:52)
[GCC 2.95.3 20010315 (release)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
dlopen("/usr/lib/python2.2/lib-dynload/readline.so", 2);
import readline # dynamically loaded from
/usr/lib/python2.2/lib-dynload/readline.so
>>>

I can't find anything about how to set my PYTHONHOME variable; ie, what do
I use for "<prefix>" and "<exec_prefix>?" I tried "export
PYTHONHOME=/usr/lib/python2.2:/usr/bin" but still no joy:

[john@starfleet john]$ export PYTHONHOME=/usr/lib/python2.2:/usr/bin
[john@starfleet john]$ gnucash
/home/john/.gtkrc:1: error: unexpected character `\37', expected keyword -
e.g. `style'
/home/john/.gtkrc:1: error: unexpected character `\37', expected keyword -
e.g. `style'
'import site' failed; use -v for traceback
Fatal Python error: couldn't import os
Aborted

Try again with quotes (for voodoo):

[john@starfleet john]$ export PYTHONHOME="/usr/lib/python2.2:/usr/bin"
[john@starfleet john]$ echo $PYTHONHOME
/usr/lib/python2.2:/usr/bin
[john@starfleet john]$ gnucash
/home/john/.gtkrc:1: error: unexpected character `\37', expected keyword -
e.g. `style'
/home/john/.gtkrc:1: error: unexpected character `\37', expected keyword -
e.g. `style'
'import site' failed; use -v for traceback
Fatal Python error: couldn't import os
Aborted

Still nothing.

What gives?  What do I have to do to get gnucash back inworking order?

BTW, running kernel 2.4.10, python 2.2 on a PII-350 with 384MB RAM.


-- 


-John (John.Thompson@attglobal.net)