sudo apt-get install python-apt
returning error:
python-apt : Depends: python (<2.8) but 3.3.3-1 is to be installed
I have removed python3 from the machine using apt-get
When I run:
dpkg-query --list
I get the following for python:
ri python 3.3.3-1 python-3.3.3
ii python2.7 2.7.3-0ubuntu3
but by running python --version
Python 2.7.3
How can I remove any of the python 3.3.3-1 references/packages from my system?
apt-cache policy python python2 python3
python:
Installed: 3.3.3-1
Candidate: 3.3.3-1
Version table:
*** 3.3.3-1 0
100 /var/lib/dpkg/status
2.7.3-0ubuntu2.2 0
500 http://gb.archive.ubuntu.com/ubuntu/ precise-updates/main amd64 Packages
2.7.3-0ubuntu2 0
500 http://gb.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
python3:
Installed: (none)
Candidate: 3.2.3-0ubuntu1.2
Version table:
3.2.3-0ubuntu1.2 0
500 http://gb.archive.ubuntu.com/ubuntu/ precise-updates/main amd64 Packages
3.2.3-0ubuntu1 0
500 http://gb.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
N: Unable to locate package python2
After Byte Commander's comment:
apt-cache policy python
python:
Installed: 2.7.3-0ubuntu2.2
Candidate: 2.7.3-0ubuntu2.2
Version table:
*** 2.7.3-0ubuntu2.2 0
500 http://gb.archive.ubuntu.com/ubuntu/ precise-updates/main amd64 Packages
100 /var/lib/dpkg/status
2.7.3-0ubuntu2 0
500 http://gb.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
apt policy python python2 python3
to your question, please? But most importantly, don't mess with the Python if you are not sure what you are doing! Many of Ubuntu's applications (like e.g. theapt
package manager itself) depend on Python and will no longer work after you remove it. The goal here is not to uninstall Python (except if you installed additional Pythons yourself, but not the system packages).python
package in your local package cache which provides Python 3, although it should be Python 2. If you hopefully haven't messed up too much yet andapt-get
still works, try running this:sudo apt-get install python=2.7.3-0ubuntu2.2 python3
and remove your cached packages withsudo apt-get clean
afterwards. Please reply back whether it worked and post its output, together with the output ofapt-cache policy python
again./var/log/apt/history.log
and see which packages got removed when you uninstalledpython3
earlier (which you should not have done) and reinstall them again.