Active Topics

 



Notices


Reply
Thread Tools
Posts: 353 | Thanked: 263 times | Joined on Dec 2009 @ Finland
#1
Hi

Every time I install, update or remove something with apt-get I get this following error:

Code:
Setting up python-hildondesktop (0.1.0-1maemo2) ...
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/sbin/update-python-modules", line 11, in <module>
    import sys,os,shutil
ImportError: No module named os
dpkg: error processing python-hildondesktop (--configure):
 subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
 python-hildondesktop
E: Sub-process /usr/bin/dpkg returned an error code (1)
Everything else works fine but I think that python programs doesn't work at all (at least hermes doesn't). Does someone have some idea how to fix this?
 
Posts: 24 | Thanked: 8 times | Joined on Dec 2009
#2
same thing here. I must have something wrong with the python environment.
If I run python in the shell, or try to install/uninstall some python-based packages, I have errors like those:
Code:
Nokia-N900-42-11:~# python
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
Python 2.5.4 (r254:67916, Nov 26 2009, 22:24:46) 
[GCC 4.2.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 

Nokia-N900-42-11:~# export PYTHONHOME=/usr/lib/python2.5 
Nokia-N900-42-11:~# python
'import site' failed; use -v for traceback
Python 2.5.4 (r254:67916, Nov 26 2009, 22:24:46) 
[GCC 4.2.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
I think it could be fixed by setting $PYTHONHOME to the appropriate path ...
 
Posts: 402 | Thanked: 229 times | Joined on Nov 2009 @ Missouri, USA
#3
try;
Code:
apt-get --reinstall install python
__________________
aspidites | blog | aspidites@inbox.com
 
Posts: 24 | Thanked: 8 times | Joined on Dec 2009
#4
That didn't help. It still blocks trying to configure the half-configured packages (which on my system are python-openssl, python-papyon, python-telepathy).
Code:
Nokia-N900-42-11:~# apt-get --reinstall install python
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 11 not upgraded.
3 not fully installed or removed.
Need to get 0B/36,9kB of archives.
After this operation, 0B of additional disk space will be used.
Do you want to continue [Y/n]? 
(Reading database ... 25811 files and directories currently installed.)
Preparing to replace python 2.5.2-3maemo3 (using .../python_2.5.2-3maemo3_all.deb) ...
Unpacking replacement python ...
Setting up python (2.5.2-3maemo3) ...
Setting up python-openssl (0.7-2maemo2) ...
'import site' failed; use -v for traceback
Traceback (most recent call last):
  File "/usr/sbin/update-python-modules", line 11, in <module>
    import sys,os,shutil
ImportError: No module named os
dpkg: error processing python-openssl (--configure):
 subprocess post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of python-papyon:
 python-papyon depends on python-openssl; however:
  Package python-openssl is not configured yet.
dpkg: error processing python-papyon (--configure):
 dependency problems - leaving unconfigured
Setting up python-telepathy (0.15.11-1maemo0) ...
'import site' failed; use -v for traceback
Traceback (most recent call last):
  File "/usr/bin/pycentral", line 3, in <module>
    import fnmatch, glob, os, re, string, sys, time, cStringIO
ImportError: No module named fnmatch
dpkg: error processing python-telepathy (--configure):
 subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
 python-openssl
 python-papyon
 python-telepathy
E: Sub-process /usr/bin/dpkg returned an error code (1)
Nokia-N900-42-11:~#
edit:
I manually removed the offending packages from /var/lib/dpkg/status, python reinstallation went fine, but I still have the same error when trying to run python.
python applications, like gpodder, do not work.
Code:
Nokia-N900-42-11:/var/lib/dpkg# python
'import site' failed; use -v for traceback
Python 2.5.4 (r254:67916, Nov 26 2009, 22:24:46) 
[GCC 4.2.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 
Nokia-N900-42-11:/var/lib/dpkg#

Last edited by simoneb; 2010-01-06 at 00:11. Reason: updated
 
yerga's Avatar
Posts: 696 | Thanked: 1,012 times | Joined on Mar 2006 @ Asturies, Spain
#5
Try:
apt-get remove --purge pymaemo-optify
apt-get install -f
apt-get install pymaemo-optify=0.4
 

The Following User Says Thank You to yerga For This Useful Post:
Posts: 24 | Thanked: 8 times | Joined on Dec 2009
#6
I seem to have tracked down the problem to python-hildon. I removed/purged everything till there and then reinstalled and I don't have that error any more when running python or installing packages.

However, I can't run any python application (e.g. accdisplay). It just hangs with a black screen for a while and then exists the application.
I think that something else is missing about python-hildon. (I already tried apt-get install -f and all dependencies seem ok..)
Code:
Nokia-N900-42-11:/home/opt/accDisplay# python accDisplay.py 
Traceback (most recent call last):
  File "accDisplay.py", line 28, in <module>
    import hildon
ImportError: could not import gtk

Nokia-N900-42-11:/home/opt/accDisplay# python
Python 2.5.4 (r254:67916, Nov 26 2009, 22:24:46) 
[GCC 4.2.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import hildon
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: could not import gtk
>>>
edit:
Seems to be related to python-cairo. I tried to reinstall it with no luck. It seems to be always looking for libraries in the wrong place.
Code:
Nokia-N900-42-11:~# python
Python 2.5.4 (r254:67916, Nov 26 2009, 22:24:46) 
[GCC 4.2.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import site
>>> import _cairo
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named _cairo
>>>

Last edited by simoneb; 2010-01-06 at 11:54. Reason: updated
 
Posts: 402 | Thanked: 229 times | Joined on Nov 2009 @ Missouri, USA
#7
any reason for the underscore? _cairo module doesn't exist, but this should work:
>>> import cairo
__________________
aspidites | blog | aspidites@inbox.com
 
Reply


 
Forum Jump


All times are GMT. The time now is 23:18.