Help with python

Hi guy’s I’m having a problem with installing realflow on openSUSE 11.2 , When I run realflow I’m getting this error

/usr/local/bin/realflow/lib:/usr/lib64/mpi/gcc/openmpi/lib64
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

I have no idea how to change the path, or if I could link this. The last thing I want to do is to mess things up. Any help would be great. cheers guys

You can set PYTHONHOME just as any other env variable:

PYTHONHOME=<path> <program-to-run>

or you can export it:

export PYTHONHOME=<path>

(from .profile for example). http://docs.python.org/using/cmdline.html#environment-variables.
k

I’m sorry I don’t understand. When I write the code I get theses errors

user@linux-xoxz:~> python
Python 2.6.2 (r262:71600, Mar 29 2010, 15:30:01)
[GCC 4.4.1 [gcc-4_4-branch revision 150839]] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> PYTHONHOME=<usr/local/bin/realflow/bin> <realflow>
  File "<stdin>", line 1
    PYTHONHOME=<usr/local/bin/realflow/bin> <realflow>
               ^
SyntaxError: invalid syntax
>>> export PYTHONHOME=<usr/local/bin/realflow/bin>
  File "<stdin>", line 1
    export PYTHONHOME=<usr/local/bin/realflow/bin>
                    ^
SyntaxError: invalid syntax
>>>

Also I’m not sure where I should write the code… in python, or in the programs python scripts?

I have no idea of coding so if someone can dumb it down for me that would be great. :\

Hello terry2sticks,

You don’t need to write it in any python code.
You need to run it from the command line before you run the python program.

So you open the konsole and type this:

export PYTHONHOME=<path>

I see in your error message that you left the <>.
You need to remove them so if your pythonhome is in /usr/lib/python the command will look like this:

export PYTHONHOME=/usr/lib/python/

Good luck!:wink:

Thank you Edward_Iii

Thats works, How can I make it permanent as I need to type it in every time. Also do you have any idea how I can fix the following errors as well please.

user@linux-xoxz:~> export PYTHONHOME=/usr/lib64/python/
user@linux-xoxz:~> realflow
/usr/local/bin/realflow/lib:/usr/lib64/mpi/gcc/openmpi/lib64
'import site' failed; use -v for traceback
sh: mozilla: command not found

I pasted all the code to make sure I did what you said correct.

Hello terry2sticks,

You can make it permanent by adding this line to your /home/<USER>/.bashrc:

export PYTHONHOME=/usr/lib64/python/

If you don’t have a .bashrc simply create one.

The problem is that realflow is trying to start a command named mozilla.
I’m not sure which program realflow is looking for but I think it is Firefox.
Where going to make an alias so that if the program is trying to start mozilla it will actually start Firefox.
You can do this by using this command:

alias mozilla='firefox'

You can also make this permanent by adding the line in your .bashrc file.

Good luck!:wink:

Edward Iii you rock,

You can make it permanent by adding this line to your /home/<USER>/.bashrc:

This worked great

The problem is that realflow is trying to start a command named mozilla.
I’m not sure which program realflow is looking for but I think it is Firefox.
Where going to make an alias so that if the program is trying to start mozilla it will actually start Firefox.
You can do this by using this command:

alias mozilla='firefox'

You can also make this permanent by adding the line in your .bashrc file.

This didn’t work but it seems I didn’t need realflow to open firefox in the end to add my serial number, just needed to do it via the tool menu inside realflow, instead of the first prompt when strting realflow.

Thanks for all your help.