I tried to remove/add several python packages and always got the error message "Package operation failed" (using the ubuntu software center). When I tried to remove e.g. python-scipy using the terminal, I got the following:
>pcfun27@pcfun27:~$ sudo apt-get remove python-scipy
>Reading package lists... Done
>Building dependency tree
>Reading state information... Done
>The following packages will be REMOVED:
> python-scipy
>0 upgraded, 0 newly installed, 1 to remove and 9 not upgraded.
>5 not fully installed or removed.
>After this operation, 22.6MB disk space will be freed.
>Do you want to continue [Y/n]? y
>(Reading database ... 243686 files and directories currently installed.)
>Removing python-scipy ...
>Traceback (most recent call last):
> File "/usr/bin/pycentral", line 2300, in <module>
> main()
> File "/usr/bin/pycentral", line 2294, in main
> rv = action.run(global_options)
> File "/usr/bin/pycentral", line 1653, in run
> runtimes = get_installed_runtimes(with_unsupported=True)
> File "/usr/bin/pycentral", line 278, in get_installed_runtimes
> default_version = pyversions.default_version(version_only=True)
> File "/usr/share/pycentral-data/pyversions.py", line 172, in default_version
> raise ValueError, "/usr/bin/python does not match the python default version. It
>must be reset to point to %s" % debian_default
>ValueError: /usr/bin/python does not match the python default version. It must be reset
>to point to python2.5
>dpkg: error processing python-scipy (--remove):
> subprocess installed pre-removal script returned error exit status 1
>Traceback (most recent call last):
> File "/usr/bin/pycentral", line 2300, in <module>
> main()
> File "/usr/bin/pycentral", line 2294, in main
> rv = action.run(global_options)
> File "/usr/bin/pycentral", line 1477, in run
> runtimes = get_installed_runtimes()
> File "/usr/bin/pycentral", line 278, in get_installed_runtimes
> default_version = pyversions.default_version(version_only=True)
> File "/usr/share/pycentral-data/pyversions.py", line 172, in default_version
> raise ValueError, "/usr/bin/python does not match the python default version. It
>must be reset to point to %s" % debian_default
>ValueError: /usr/bin/python does not match the python default version. It must be reset
>to point to python2.5
>dpkg: error while cleaning up:
> subprocess installed post-installation script returned error exit status 1
>Errors were encountered while processing:
> python-scipy
>E: Sub-process /usr/bin/dpkg returned an error code (1)
>pcfun27@pcfun27:~$
I already found similar problems in some mailing lists and forums, but no solution did really help (at all). I also think that this is a quite bigger problem, since I the "Package operation failed" error trying to install/remove any package (even though they do get removed/installed).
I would really appreciate if someone had a hint for me, because I really need to install/remove certain packages to go on working on my thesis.
OS is Ubuntu 10.04 running on a 64-bit machine.
Please tell me if you need further information.

ls -l /usr/bin/python; which python; ls -l $(which python); python -V; echo $PATH– medigeek Jan 24 '12 at 9:47