Score:0

Unable to uninstall python-wxgtk3.0 in Ubuntu 20.04

gb flag

When I try to uninstall this package, I get the message that

python-wxgtk3.0 installed python-wxgtk3.0 package pre-removal script subprocess returned error exit status 1

Here is the output:

After this operation, 30.5 MB disk space will be freed.
Do you want to continue? [Y/n] 
(Reading database ... 308794 files and directories currently installed.)
Removing python-wxgtk3.0 (3.0.2.0+dfsg-8build1) ...
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
ImportError: No module named site
dpkg: error processing package python-wxgtk3.0 (--remove):
 installed python-wxgtk3.0 package pre-removal script subprocess returned error exit status 1
dpkg: too many errors, stopping
update-alternatives: error: alternative path /usr/lib/wx/python/wx3.0.pth doesn't exist
dpkg: error while cleaning up:
 installed python-wxgtk3.0 package post-installation script subprocess returned error exit status 2
Errors were encountered while processing:
 python-wxgtk3.0
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)
Knud Larsen avatar
by flag
Maybe you removed another python package before python-wxgtk3.0 ? I.e. removing essential python could be the cause of your unusual error ?
sequence avatar
gb flag
@KnudLarsen Yes, I think I did it. Then I reinstalled Python from source code. However, I don't know how to fix this problem now.
Knud Larsen avatar
by flag
Never touch the system python. All package handling, in out, depends on it. ......... Fix : If you know exactly what you did, repair the OS from an external live OS. Else, make backups , and reinstall.
sequence avatar
gb flag
@KnudLarsen I'm surprised Python (and, in particular, Python 2) is so integrated into the Ubuntu system.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.