Cannot uninstall python on Ubuntu? [duplicate]












-2
















This question already has an answer here:




  • Removed Python 3 and now Ubuntu Software Center, terminal and other applications don't work

    4 answers




I have confused to uninstall python3 or fix my VPS Ubuntu



Im using Ubuntu 16.04.5 LTS (GNU/Linux 4.4.0-31-generic x86_64)



I tried to uninstall all python packages



sudo apt-get purge python3



And getting this error



dpkg: error processing package python3-pkg-resources (--remove):
subprocess installed pre-removal script returned error exit status 127 Processing triggers for libc-bin (2.23-0ubuntu10) ...
Errors were encountered while processing:
python3-lxml
python3-pip
python3-apt
python3-pyparsing
gir1.2-ibus-1.0:amd64
hplip-data
python3-blinker
python3-bs4
python3-cairo
python3-chardet
python3-dbus
python3-defer
python3-feedparser
python3-gi
python3-guacamole
python3-httplib2
python3-idna
python3-jwt
python3-louis
python3-markupsafe
python3-padme
python3-setuptools
python3-problem-report
python3-ptyprocess
python3-pyasn1
python3-pycurl
python3-six
python3-wheel
python3-xdg
python3-xkit
python3-xlsxwriter
dh-python
python3
python3-pkg-resources
E: Sub-process /usr/bin/dpkg returned an error code (1)


I tried other way from other site,error still same
And i tried to reinstall my ubuntu with command line



apt-get install --reinstall ubuntu-desktop



I dont know should i do to fix my ubuntu and reinstall my python.



Note:
I tried to run python3 it not working with reasons python3 is not package and i run python3.7 it working fine,idk python3.7 thats reall python package i have or something else :/



Im so appreciate any help










share|improve this question















marked as duplicate by karel, Elder Geek, N0rbert, Fabby, Charles Green Jan 26 at 3:21


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.



















  • Im just want to uninstall and reinstall it,bcz before what i do that i have some error,

    – katro coplax
    Jan 25 at 13:58













  • Don't this is a terrible idea, python3 is a dependency for so much (I think even apt is a dependency) edit: Gah someone beat me to it

    – j-money
    Jan 25 at 13:58








  • 4





    Removing Python 3 will destroy the operational state of your system because so many things depend on it. DO NOT remove Python 3 from your system. Instead, address the actual errors you're seeing, rather than assume that Python 3 being present is the cause.

    – Thomas Ward
    Jan 25 at 14:32
















-2
















This question already has an answer here:




  • Removed Python 3 and now Ubuntu Software Center, terminal and other applications don't work

    4 answers




I have confused to uninstall python3 or fix my VPS Ubuntu



Im using Ubuntu 16.04.5 LTS (GNU/Linux 4.4.0-31-generic x86_64)



I tried to uninstall all python packages



sudo apt-get purge python3



And getting this error



dpkg: error processing package python3-pkg-resources (--remove):
subprocess installed pre-removal script returned error exit status 127 Processing triggers for libc-bin (2.23-0ubuntu10) ...
Errors were encountered while processing:
python3-lxml
python3-pip
python3-apt
python3-pyparsing
gir1.2-ibus-1.0:amd64
hplip-data
python3-blinker
python3-bs4
python3-cairo
python3-chardet
python3-dbus
python3-defer
python3-feedparser
python3-gi
python3-guacamole
python3-httplib2
python3-idna
python3-jwt
python3-louis
python3-markupsafe
python3-padme
python3-setuptools
python3-problem-report
python3-ptyprocess
python3-pyasn1
python3-pycurl
python3-six
python3-wheel
python3-xdg
python3-xkit
python3-xlsxwriter
dh-python
python3
python3-pkg-resources
E: Sub-process /usr/bin/dpkg returned an error code (1)


I tried other way from other site,error still same
And i tried to reinstall my ubuntu with command line



apt-get install --reinstall ubuntu-desktop



I dont know should i do to fix my ubuntu and reinstall my python.



Note:
I tried to run python3 it not working with reasons python3 is not package and i run python3.7 it working fine,idk python3.7 thats reall python package i have or something else :/



Im so appreciate any help










share|improve this question















marked as duplicate by karel, Elder Geek, N0rbert, Fabby, Charles Green Jan 26 at 3:21


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.



















  • Im just want to uninstall and reinstall it,bcz before what i do that i have some error,

    – katro coplax
    Jan 25 at 13:58













  • Don't this is a terrible idea, python3 is a dependency for so much (I think even apt is a dependency) edit: Gah someone beat me to it

    – j-money
    Jan 25 at 13:58








  • 4





    Removing Python 3 will destroy the operational state of your system because so many things depend on it. DO NOT remove Python 3 from your system. Instead, address the actual errors you're seeing, rather than assume that Python 3 being present is the cause.

    – Thomas Ward
    Jan 25 at 14:32














-2












-2








-2









This question already has an answer here:




  • Removed Python 3 and now Ubuntu Software Center, terminal and other applications don't work

    4 answers




I have confused to uninstall python3 or fix my VPS Ubuntu



Im using Ubuntu 16.04.5 LTS (GNU/Linux 4.4.0-31-generic x86_64)



I tried to uninstall all python packages



sudo apt-get purge python3



And getting this error



dpkg: error processing package python3-pkg-resources (--remove):
subprocess installed pre-removal script returned error exit status 127 Processing triggers for libc-bin (2.23-0ubuntu10) ...
Errors were encountered while processing:
python3-lxml
python3-pip
python3-apt
python3-pyparsing
gir1.2-ibus-1.0:amd64
hplip-data
python3-blinker
python3-bs4
python3-cairo
python3-chardet
python3-dbus
python3-defer
python3-feedparser
python3-gi
python3-guacamole
python3-httplib2
python3-idna
python3-jwt
python3-louis
python3-markupsafe
python3-padme
python3-setuptools
python3-problem-report
python3-ptyprocess
python3-pyasn1
python3-pycurl
python3-six
python3-wheel
python3-xdg
python3-xkit
python3-xlsxwriter
dh-python
python3
python3-pkg-resources
E: Sub-process /usr/bin/dpkg returned an error code (1)


I tried other way from other site,error still same
And i tried to reinstall my ubuntu with command line



apt-get install --reinstall ubuntu-desktop



I dont know should i do to fix my ubuntu and reinstall my python.



Note:
I tried to run python3 it not working with reasons python3 is not package and i run python3.7 it working fine,idk python3.7 thats reall python package i have or something else :/



Im so appreciate any help










share|improve this question

















This question already has an answer here:




  • Removed Python 3 and now Ubuntu Software Center, terminal and other applications don't work

    4 answers




I have confused to uninstall python3 or fix my VPS Ubuntu



Im using Ubuntu 16.04.5 LTS (GNU/Linux 4.4.0-31-generic x86_64)



I tried to uninstall all python packages



sudo apt-get purge python3



And getting this error



dpkg: error processing package python3-pkg-resources (--remove):
subprocess installed pre-removal script returned error exit status 127 Processing triggers for libc-bin (2.23-0ubuntu10) ...
Errors were encountered while processing:
python3-lxml
python3-pip
python3-apt
python3-pyparsing
gir1.2-ibus-1.0:amd64
hplip-data
python3-blinker
python3-bs4
python3-cairo
python3-chardet
python3-dbus
python3-defer
python3-feedparser
python3-gi
python3-guacamole
python3-httplib2
python3-idna
python3-jwt
python3-louis
python3-markupsafe
python3-padme
python3-setuptools
python3-problem-report
python3-ptyprocess
python3-pyasn1
python3-pycurl
python3-six
python3-wheel
python3-xdg
python3-xkit
python3-xlsxwriter
dh-python
python3
python3-pkg-resources
E: Sub-process /usr/bin/dpkg returned an error code (1)


I tried other way from other site,error still same
And i tried to reinstall my ubuntu with command line



apt-get install --reinstall ubuntu-desktop



I dont know should i do to fix my ubuntu and reinstall my python.



Note:
I tried to run python3 it not working with reasons python3 is not package and i run python3.7 it working fine,idk python3.7 thats reall python package i have or something else :/



Im so appreciate any help





This question already has an answer here:




  • Removed Python 3 and now Ubuntu Software Center, terminal and other applications don't work

    4 answers








apt package-management python dpkg python3






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 25 at 14:01







katro coplax

















asked Jan 25 at 13:50









katro coplaxkatro coplax

11




11




marked as duplicate by karel, Elder Geek, N0rbert, Fabby, Charles Green Jan 26 at 3:21


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.









marked as duplicate by karel, Elder Geek, N0rbert, Fabby, Charles Green Jan 26 at 3:21


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.















  • Im just want to uninstall and reinstall it,bcz before what i do that i have some error,

    – katro coplax
    Jan 25 at 13:58













  • Don't this is a terrible idea, python3 is a dependency for so much (I think even apt is a dependency) edit: Gah someone beat me to it

    – j-money
    Jan 25 at 13:58








  • 4





    Removing Python 3 will destroy the operational state of your system because so many things depend on it. DO NOT remove Python 3 from your system. Instead, address the actual errors you're seeing, rather than assume that Python 3 being present is the cause.

    – Thomas Ward
    Jan 25 at 14:32



















  • Im just want to uninstall and reinstall it,bcz before what i do that i have some error,

    – katro coplax
    Jan 25 at 13:58













  • Don't this is a terrible idea, python3 is a dependency for so much (I think even apt is a dependency) edit: Gah someone beat me to it

    – j-money
    Jan 25 at 13:58








  • 4





    Removing Python 3 will destroy the operational state of your system because so many things depend on it. DO NOT remove Python 3 from your system. Instead, address the actual errors you're seeing, rather than assume that Python 3 being present is the cause.

    – Thomas Ward
    Jan 25 at 14:32

















Im just want to uninstall and reinstall it,bcz before what i do that i have some error,

– katro coplax
Jan 25 at 13:58







Im just want to uninstall and reinstall it,bcz before what i do that i have some error,

– katro coplax
Jan 25 at 13:58















Don't this is a terrible idea, python3 is a dependency for so much (I think even apt is a dependency) edit: Gah someone beat me to it

– j-money
Jan 25 at 13:58







Don't this is a terrible idea, python3 is a dependency for so much (I think even apt is a dependency) edit: Gah someone beat me to it

– j-money
Jan 25 at 13:58






4




4





Removing Python 3 will destroy the operational state of your system because so many things depend on it. DO NOT remove Python 3 from your system. Instead, address the actual errors you're seeing, rather than assume that Python 3 being present is the cause.

– Thomas Ward
Jan 25 at 14:32





Removing Python 3 will destroy the operational state of your system because so many things depend on it. DO NOT remove Python 3 from your system. Instead, address the actual errors you're seeing, rather than assume that Python 3 being present is the cause.

– Thomas Ward
Jan 25 at 14:32










2 Answers
2






active

oldest

votes


















0














Ubuntu 16.04 comes with Python3 installed by default. If you want to install Python 2 you can run:



sudo apt install python-minimal


On the command line you should use python3 or python2 to execute scripts.



Also take note that ubuntu-desktop is a package that will install a full display system such as X server and Gnome packages, none of which you'll have much use for if connecting over SSH.



However, the problem you may have now is that you've attempted (or succeeded to some degree) in removing Python, which is actually what the package management tool apt uses to install/remove packages.






share|improve this answer


























  • Doesn't 16.04 come with Python 2 installed? I thought 17.10 was the first release not to.

    – wjandrea
    Jan 25 at 14:38






  • 1





    I thought so too, but I actually fired up 16.04.5 in a VM and it's not there by default at least with a server installation, only python3 was.

    – Kristopher Ives
    Jan 25 at 15:26



















0














This seems like an XY-problem. Problem Y, uninstalling Python 3, will break your OS. Don't do that.



Problem X is not clear, but assuming it's that the system Python 3 executable is damaged, you can reinstall it via the package python3.5-minimal:



sudo apt-get install --reinstall python3.5-minimal





share|improve this answer


























  • If you've "successfully" removed python3 you cannot actually run most apt commands.

    – Kristopher Ives
    Jan 25 at 15:27











  • @Kristopher Good point. I assume the output in the question indicates that no action was taken, but I might be wrong.

    – wjandrea
    Jan 25 at 15:30


















2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














Ubuntu 16.04 comes with Python3 installed by default. If you want to install Python 2 you can run:



sudo apt install python-minimal


On the command line you should use python3 or python2 to execute scripts.



Also take note that ubuntu-desktop is a package that will install a full display system such as X server and Gnome packages, none of which you'll have much use for if connecting over SSH.



However, the problem you may have now is that you've attempted (or succeeded to some degree) in removing Python, which is actually what the package management tool apt uses to install/remove packages.






share|improve this answer


























  • Doesn't 16.04 come with Python 2 installed? I thought 17.10 was the first release not to.

    – wjandrea
    Jan 25 at 14:38






  • 1





    I thought so too, but I actually fired up 16.04.5 in a VM and it's not there by default at least with a server installation, only python3 was.

    – Kristopher Ives
    Jan 25 at 15:26
















0














Ubuntu 16.04 comes with Python3 installed by default. If you want to install Python 2 you can run:



sudo apt install python-minimal


On the command line you should use python3 or python2 to execute scripts.



Also take note that ubuntu-desktop is a package that will install a full display system such as X server and Gnome packages, none of which you'll have much use for if connecting over SSH.



However, the problem you may have now is that you've attempted (or succeeded to some degree) in removing Python, which is actually what the package management tool apt uses to install/remove packages.






share|improve this answer


























  • Doesn't 16.04 come with Python 2 installed? I thought 17.10 was the first release not to.

    – wjandrea
    Jan 25 at 14:38






  • 1





    I thought so too, but I actually fired up 16.04.5 in a VM and it's not there by default at least with a server installation, only python3 was.

    – Kristopher Ives
    Jan 25 at 15:26














0












0








0







Ubuntu 16.04 comes with Python3 installed by default. If you want to install Python 2 you can run:



sudo apt install python-minimal


On the command line you should use python3 or python2 to execute scripts.



Also take note that ubuntu-desktop is a package that will install a full display system such as X server and Gnome packages, none of which you'll have much use for if connecting over SSH.



However, the problem you may have now is that you've attempted (or succeeded to some degree) in removing Python, which is actually what the package management tool apt uses to install/remove packages.






share|improve this answer















Ubuntu 16.04 comes with Python3 installed by default. If you want to install Python 2 you can run:



sudo apt install python-minimal


On the command line you should use python3 or python2 to execute scripts.



Also take note that ubuntu-desktop is a package that will install a full display system such as X server and Gnome packages, none of which you'll have much use for if connecting over SSH.



However, the problem you may have now is that you've attempted (or succeeded to some degree) in removing Python, which is actually what the package management tool apt uses to install/remove packages.







share|improve this answer














share|improve this answer



share|improve this answer








edited Jan 25 at 14:12

























answered Jan 25 at 14:04









Kristopher IvesKristopher Ives

2,83211525




2,83211525













  • Doesn't 16.04 come with Python 2 installed? I thought 17.10 was the first release not to.

    – wjandrea
    Jan 25 at 14:38






  • 1





    I thought so too, but I actually fired up 16.04.5 in a VM and it's not there by default at least with a server installation, only python3 was.

    – Kristopher Ives
    Jan 25 at 15:26



















  • Doesn't 16.04 come with Python 2 installed? I thought 17.10 was the first release not to.

    – wjandrea
    Jan 25 at 14:38






  • 1





    I thought so too, but I actually fired up 16.04.5 in a VM and it's not there by default at least with a server installation, only python3 was.

    – Kristopher Ives
    Jan 25 at 15:26

















Doesn't 16.04 come with Python 2 installed? I thought 17.10 was the first release not to.

– wjandrea
Jan 25 at 14:38





Doesn't 16.04 come with Python 2 installed? I thought 17.10 was the first release not to.

– wjandrea
Jan 25 at 14:38




1




1





I thought so too, but I actually fired up 16.04.5 in a VM and it's not there by default at least with a server installation, only python3 was.

– Kristopher Ives
Jan 25 at 15:26





I thought so too, but I actually fired up 16.04.5 in a VM and it's not there by default at least with a server installation, only python3 was.

– Kristopher Ives
Jan 25 at 15:26













0














This seems like an XY-problem. Problem Y, uninstalling Python 3, will break your OS. Don't do that.



Problem X is not clear, but assuming it's that the system Python 3 executable is damaged, you can reinstall it via the package python3.5-minimal:



sudo apt-get install --reinstall python3.5-minimal





share|improve this answer


























  • If you've "successfully" removed python3 you cannot actually run most apt commands.

    – Kristopher Ives
    Jan 25 at 15:27











  • @Kristopher Good point. I assume the output in the question indicates that no action was taken, but I might be wrong.

    – wjandrea
    Jan 25 at 15:30
















0














This seems like an XY-problem. Problem Y, uninstalling Python 3, will break your OS. Don't do that.



Problem X is not clear, but assuming it's that the system Python 3 executable is damaged, you can reinstall it via the package python3.5-minimal:



sudo apt-get install --reinstall python3.5-minimal





share|improve this answer


























  • If you've "successfully" removed python3 you cannot actually run most apt commands.

    – Kristopher Ives
    Jan 25 at 15:27











  • @Kristopher Good point. I assume the output in the question indicates that no action was taken, but I might be wrong.

    – wjandrea
    Jan 25 at 15:30














0












0








0







This seems like an XY-problem. Problem Y, uninstalling Python 3, will break your OS. Don't do that.



Problem X is not clear, but assuming it's that the system Python 3 executable is damaged, you can reinstall it via the package python3.5-minimal:



sudo apt-get install --reinstall python3.5-minimal





share|improve this answer















This seems like an XY-problem. Problem Y, uninstalling Python 3, will break your OS. Don't do that.



Problem X is not clear, but assuming it's that the system Python 3 executable is damaged, you can reinstall it via the package python3.5-minimal:



sudo apt-get install --reinstall python3.5-minimal






share|improve this answer














share|improve this answer



share|improve this answer








edited Jan 25 at 14:54

























answered Jan 25 at 14:36









wjandreawjandrea

9,27942664




9,27942664













  • If you've "successfully" removed python3 you cannot actually run most apt commands.

    – Kristopher Ives
    Jan 25 at 15:27











  • @Kristopher Good point. I assume the output in the question indicates that no action was taken, but I might be wrong.

    – wjandrea
    Jan 25 at 15:30



















  • If you've "successfully" removed python3 you cannot actually run most apt commands.

    – Kristopher Ives
    Jan 25 at 15:27











  • @Kristopher Good point. I assume the output in the question indicates that no action was taken, but I might be wrong.

    – wjandrea
    Jan 25 at 15:30

















If you've "successfully" removed python3 you cannot actually run most apt commands.

– Kristopher Ives
Jan 25 at 15:27





If you've "successfully" removed python3 you cannot actually run most apt commands.

– Kristopher Ives
Jan 25 at 15:27













@Kristopher Good point. I assume the output in the question indicates that no action was taken, but I might be wrong.

– wjandrea
Jan 25 at 15:30





@Kristopher Good point. I assume the output in the question indicates that no action was taken, but I might be wrong.

– wjandrea
Jan 25 at 15:30



Popular posts from this blog

Human spaceflight

Can not write log (Is /dev/pts mounted?) - openpty in Ubuntu-on-Windows?

File:DeusFollowingSea.jpg