maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Troubleshooting (https://talk.maemo.org/forumdisplay.php?f=6)
-   -   Python association problems? Please help (https://talk.maemo.org/showthread.php?t=24668)

Munk 2008-10-31 04:40

Python association problems? Please help
 
Hello everyone. I use to be able to type the name of a Python program that I wanted to run at a xterminal and it worked like this:
Code:

somepythonprogram.py
Now after doing an upgrade I have to preface it with "python2.5" to get it to run, such as:
Code:

python2.5 somepythonprogram.py
Plus, many of the Python programs that once worked no longer launch such as DialCentral and the newly installed mClock.

I've uninstalled Python-2.5 and re-installed it a million times. I've done "apt-get python...." a million times. I've installed Python launcher in hopes that something would get fixed but to no avail. I've also read and tried different things for hours on end and nothing seems to be fixing it.

yerga 2008-10-31 10:34

Re: Python association problems? Please help
 
Quote:

Originally Posted by Munk (Post 238106)
Hello everyone. I use to be able to type the name of a Python program that I wanted to run at a xterminal and it worked like this:
Code:

somepythonprogram.py
Now after doing an upgrade I have to preface it with "python2.5" to get it to run, such as:
Code:

python2.5 somepythonprogram.py
Plus, many of the Python programs that once worked no longer launch such as DialCentral and the newly installed mClock.

I've uninstalled Python-2.5 and re-installed it a million times. I've done "apt-get python...." a million times. I've installed Python launcher in hopes that something would get fixed but to no avail. I've also read and tried different things for hours on end and nothing seems to be fixing it.

What's the output running "python"?

What's the output if you run "python /usr/bin/mClock"?

From the terminal, I mean.

Also, it would be useful if you upload the file created with:
"dpkg -l python* > /media/mmc2/installed_python_packages.txt"

Munk 2008-11-03 04:32

Re: Python association problems? Please help
 
1 Attachment(s)
Oh man, thanks yerga for helping. Here are the results you asked for.

Quote:

Originally Posted by yerga (Post 238141)
What's the output running "python"?

If I type just "python" I get the message of:
Code:

/bin/sh: not found

Quote:

Originally Posted by yerga (Post 238141)
What's the output if you run "python /usr/bin/mClock"?

If I type that I get the same exact error message:
Code:

/bin/sh: not found
As a test, I have also tried typing:
Code:

python2.5 /usr/bin/mClock
And I get this error message:
Code:

File "/usr/bin/mClock", line 2
  exec python -O /usr/lib/mClock/mClock.py $
                                          ^

Quote:

Originally Posted by yerga (Post 238141)
Also, it would be useful if you upload the file created with:
"dpkg -l python* > /media/mmc2/installed_python_packages.txt"

Ok, I've created the file, transferred it to my WinXP comp and uploaded it here. Hopefully the carriage return formatting doesn't cause any problems.

hvacengi 2008-11-03 13:40

Re: Python association problems? Please help
 
Did you have python launcher installed and then uninstall it?

I had this same issue a week or so ago, and it looks like when I uninstalled python launcher it didn't repair the link for "/usr/bin/python"

If you run the command
Code:

cd /usr/bin
ls -l python

it will give you the target of the existing python link. it should point to "/usr/bin/python2.5", or "./python2.5" (the former being preferred)

If it shows a different target, you'll need to run the following command as root to get it working:
Code:

rm python
ln -s /usr/bin/python2.5 python

I hope this helps fix the issues you're seeing!

Munk 2008-11-05 00:16

Re: Python association problems? Please help
 
hvacengi,

YES, YES, YES... That did it. Awesome. I'd hit 'thanks' ten times but that would just leave you with no thanks.

Thank you both for your awesome help.

hvacengi 2008-11-05 14:01

Re: Python association problems? Please help
 
Ha ha, I'm glad I could help out!


All times are GMT. The time now is 04:25.

vBulletin® Version 3.8.8