You are not logged in.
Pages: 1
I'm trying to play a game and it doesn't quite work properly. I get the following error:
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
I have no idea where to set PYTHONHOME to - can anyone point me in the right direction?
Offline
man python
PYTHONHOME
Change the location of the standard Python libraries. By default, the libraries are searched in ${prefix}/lib/python<version> and ${exec_prefix}/lib/python<version>, where ${prefix} and ${exec_prefix} are installation-dependent directories, both defaulting to /usr/local. When $PYTHONHOME is set to a single directory, its value replaces both ${prefix} and ${exec_prefix}. To specify different values for these, set $PYTHONHOME to ${prefix}:${exec_prefix}.
Sounds like it needs to point to /usr/lib/python2.4/
I haven't tried it though, but maybe this will help.
Offline
I've tried that and that error goes away - but the game still doesn't work as expected. Which either means that the python thing was a red herring or that /usr/lib/python2.4 isn't right. I did also try setting it to /usr/include/python2.4...
I also get the following error regardless of whether it's set or not:
Traceback (most recent call last):
File "<string>", line 1, in ?
ImportError: No module named random
Offline
Missing dependency?
Offline
What game are you trying to play? It looks like it can't find the random module which I assume would be random.py which is located in the /usr/lib/python2.4 directory. I don't know a lot about python so I don't know if I were to trust me.
Maybe the first step would be to confirm that the file is there. If it is not, try reinstalling python and see if that helps. Is this an official package or are you trying to package it yourself?
Offline
random.py is there. I had already tried reinstalling python though. I tried setting both PYTHONHOME and PYTHONPATH to /usr/lib/python2.4 and now the random module is found - but still doesn't work properly - it throws the following errors:
'import site' failed; use -v for traceback
/usr/lib/python2.4/types.py:52: Warning: 'yield' will become a reserved keyword in the future
Traceback (most recent call last):
File "<string>", line 1, in ?
File "/usr/lib/python2.4/random.py", line 42, in ?
from warnings import warn as _warn
File "/usr/lib/python2.4/warnings.py", line 6, in ?
import sys, types
File "/usr/lib/python2.4/types.py", line 52
yield 1
^
SyntaxError: invalid syntax
Vertex3f: 2
Normal3f: 1
TexCoord2f: 1
Some of that may be other output from the game and not all python.
The game is neither an official package nor one that I'm making - I just unzipped the tar file. Essentially it works perfectly except for when it's supposed to run python scripts in which case, with one exception, it just doesn't run them - but no further error is given...
Offline
Well I don't know if I can help you with a syntax error. It looks like a problem with the original program. You might want to contact the developer of the game about it or do a google search to see if anyone else has encountered similar problems.
Offline
The syntax error might be a red herring. I've tried running some of the python scripts and they all turn up the following error:
ImportError: No module named eventAPI
There is nothing called eventAPI in /usr/lib/python2.4 - I wonder if the lack of this module might be an issue...
Offline
I did a google search on "eventapi python" but it didn't turn up anything. The only thing that I can think of is that:
A) The Arch Linux python package is somehow missing it.
B) Missing dependency like snowman suggested
C) Something wrong with the program.
What game are you trying to compile? Maybe googling that will help.
Offline
The game is Devil Whiskey. I'm not even trying to compile it. I just downloaded binaries in a tar file and extracted it...
Offline
log out and back in again this can help sometimes with wonky python
if you have just downloaded it extracted it and are trying to run it, if you have already tried tis ignore me:)
deps show as sdl sdlmixer SMPEG and zlib....
do you have smpeg installed?
Offline
I have all of those installed and have rebooted since the install...
Offline
I know it's a big ask, but is there any chance someone else could install the demo and tell me if it works for them? I can get the game running but if I go into some buildings - which should trigger an event in python and run a script - I get nothing but an empty building.
If you don't get the same problem we can compare packages installed, and if you do then we can assume it's something to do with how arch is set up...
Offline
One of the deps is python 2.2 and I have 2.4. Is it possible that some deprectated APIs are being used or something like that...?
If so, what's the best way to install 2.2 and could I have both versions alongside each other. For example python 2.4 could be my base installation of python, but 2.2 would be installed somewhere and the script that starts the game could set PYTHONHOME and PYTHONPATH to the 2.2 installation...
Does that make sense? Would it work?
Offline
yep there were mass breakages from 2.2 to 2.3....
Offline
OK - so it sounds like it's worth trying then...
I went to the python page to see if I could download python, but it's only available as RPMs... also I want to be able to make sure I can install it in such a way that it doesn't overwrite my 2.4 install...
I'm a bit clueless at this point...
Offline
install it in /opt is your looking to make a pkg
or just extract to your home if its jusy for personal use
probalby worth adding the path to is to /etc/ld.so.conf
and /etc/profile.d
look at the other scripts in there for an example
usr rpmunpack to extract the files and copy thm to
Offline
I installed it in /usr/local and edited the script to use that for it's PYTHONHOME and PYTHONPATH.
Seems to have worked
and 2.4 is still the default python...
Offline
Pages: 1