dpkg: error processing python-minimal (--configure)
When I run sudo apt-get upgrade
, the dpkg error appears and interupts the process.
Error details:
Setting up python-minimal (2.7.3-0ubuntu7.1) ...
Traceback (most recent call last):
File "/usr/local/lib/python2.7/runpy.py", line 162, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/local/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/usr/local/lib/python2.7/compileall.py", line 16, in <module>
import struct
File "/usr/local/lib/python2.7/struct.py", line 1, in <module>
from _struct import *
ImportError: No module named _struct
dpkg: error processing python-minimal (--configure):
subprocess installed post-installation script returned error exit status 255
dpkg: dependency problems prevent configuration of python:
python depends on python-minimal (= 2.7.3-0ubuntu7.1); however:
Package python-minimal is not configured yet.
And this problem leads to a series of dependency problems when processing the following packages:
python
gwibber-service
libgwibber3
libgwibber-gtk3
gwibber
gwibber-service-facebook
gwibber-service-identica
gwibber-service-twitter
python-all
python-dev
python-all-dev
python-apt
python-problem-report
python-apport
python-libxml2
unity-lens-gwibber
unity-scope-video-remote
Any helps are appreciated! ^_^
Edit:
Finally, nothing I can do for this problem. And several days later, the root directory is full and I even could not uninstall any software because of this problem.
So what I can do is just to reinstall the system. ╮(╯_╰)╭
dpkg
add a comment |
When I run sudo apt-get upgrade
, the dpkg error appears and interupts the process.
Error details:
Setting up python-minimal (2.7.3-0ubuntu7.1) ...
Traceback (most recent call last):
File "/usr/local/lib/python2.7/runpy.py", line 162, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/local/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/usr/local/lib/python2.7/compileall.py", line 16, in <module>
import struct
File "/usr/local/lib/python2.7/struct.py", line 1, in <module>
from _struct import *
ImportError: No module named _struct
dpkg: error processing python-minimal (--configure):
subprocess installed post-installation script returned error exit status 255
dpkg: dependency problems prevent configuration of python:
python depends on python-minimal (= 2.7.3-0ubuntu7.1); however:
Package python-minimal is not configured yet.
And this problem leads to a series of dependency problems when processing the following packages:
python
gwibber-service
libgwibber3
libgwibber-gtk3
gwibber
gwibber-service-facebook
gwibber-service-identica
gwibber-service-twitter
python-all
python-dev
python-all-dev
python-apt
python-problem-report
python-apport
python-libxml2
unity-lens-gwibber
unity-scope-video-remote
Any helps are appreciated! ^_^
Edit:
Finally, nothing I can do for this problem. And several days later, the root directory is full and I even could not uninstall any software because of this problem.
So what I can do is just to reinstall the system. ╮(╯_╰)╭
dpkg
possible duplicated of askubuntu.com/q/270011/169736
– Braiam
Jul 26 '13 at 13:03
@Braiam, I've found this question before. The answers are suggested to reinstall python. I've tried, and failed. Thanks anyway!
– Java Xu
Jul 29 '13 at 6:19
sudo apt-get clean helps to get some space back
– frlan
Jan 6 '17 at 13:48
I changed my/usr/bin/python
symlink to point topython3.5
and it caused a very similar error to this. Not sure why, probably to do with already havingpython2.7
deps that got broken when I changed the symlink without warning. IDK, leaving this here for future travelers
– tenCupMaximum
Aug 22 '17 at 22:39
add a comment |
When I run sudo apt-get upgrade
, the dpkg error appears and interupts the process.
Error details:
Setting up python-minimal (2.7.3-0ubuntu7.1) ...
Traceback (most recent call last):
File "/usr/local/lib/python2.7/runpy.py", line 162, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/local/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/usr/local/lib/python2.7/compileall.py", line 16, in <module>
import struct
File "/usr/local/lib/python2.7/struct.py", line 1, in <module>
from _struct import *
ImportError: No module named _struct
dpkg: error processing python-minimal (--configure):
subprocess installed post-installation script returned error exit status 255
dpkg: dependency problems prevent configuration of python:
python depends on python-minimal (= 2.7.3-0ubuntu7.1); however:
Package python-minimal is not configured yet.
And this problem leads to a series of dependency problems when processing the following packages:
python
gwibber-service
libgwibber3
libgwibber-gtk3
gwibber
gwibber-service-facebook
gwibber-service-identica
gwibber-service-twitter
python-all
python-dev
python-all-dev
python-apt
python-problem-report
python-apport
python-libxml2
unity-lens-gwibber
unity-scope-video-remote
Any helps are appreciated! ^_^
Edit:
Finally, nothing I can do for this problem. And several days later, the root directory is full and I even could not uninstall any software because of this problem.
So what I can do is just to reinstall the system. ╮(╯_╰)╭
dpkg
When I run sudo apt-get upgrade
, the dpkg error appears and interupts the process.
Error details:
Setting up python-minimal (2.7.3-0ubuntu7.1) ...
Traceback (most recent call last):
File "/usr/local/lib/python2.7/runpy.py", line 162, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/local/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/usr/local/lib/python2.7/compileall.py", line 16, in <module>
import struct
File "/usr/local/lib/python2.7/struct.py", line 1, in <module>
from _struct import *
ImportError: No module named _struct
dpkg: error processing python-minimal (--configure):
subprocess installed post-installation script returned error exit status 255
dpkg: dependency problems prevent configuration of python:
python depends on python-minimal (= 2.7.3-0ubuntu7.1); however:
Package python-minimal is not configured yet.
And this problem leads to a series of dependency problems when processing the following packages:
python
gwibber-service
libgwibber3
libgwibber-gtk3
gwibber
gwibber-service-facebook
gwibber-service-identica
gwibber-service-twitter
python-all
python-dev
python-all-dev
python-apt
python-problem-report
python-apport
python-libxml2
unity-lens-gwibber
unity-scope-video-remote
Any helps are appreciated! ^_^
Edit:
Finally, nothing I can do for this problem. And several days later, the root directory is full and I even could not uninstall any software because of this problem.
So what I can do is just to reinstall the system. ╮(╯_╰)╭
dpkg
dpkg
edited Aug 23 '13 at 1:49
Java Xu
asked Jul 25 '13 at 3:23
Java XuJava Xu
1161112
1161112
possible duplicated of askubuntu.com/q/270011/169736
– Braiam
Jul 26 '13 at 13:03
@Braiam, I've found this question before. The answers are suggested to reinstall python. I've tried, and failed. Thanks anyway!
– Java Xu
Jul 29 '13 at 6:19
sudo apt-get clean helps to get some space back
– frlan
Jan 6 '17 at 13:48
I changed my/usr/bin/python
symlink to point topython3.5
and it caused a very similar error to this. Not sure why, probably to do with already havingpython2.7
deps that got broken when I changed the symlink without warning. IDK, leaving this here for future travelers
– tenCupMaximum
Aug 22 '17 at 22:39
add a comment |
possible duplicated of askubuntu.com/q/270011/169736
– Braiam
Jul 26 '13 at 13:03
@Braiam, I've found this question before. The answers are suggested to reinstall python. I've tried, and failed. Thanks anyway!
– Java Xu
Jul 29 '13 at 6:19
sudo apt-get clean helps to get some space back
– frlan
Jan 6 '17 at 13:48
I changed my/usr/bin/python
symlink to point topython3.5
and it caused a very similar error to this. Not sure why, probably to do with already havingpython2.7
deps that got broken when I changed the symlink without warning. IDK, leaving this here for future travelers
– tenCupMaximum
Aug 22 '17 at 22:39
possible duplicated of askubuntu.com/q/270011/169736
– Braiam
Jul 26 '13 at 13:03
possible duplicated of askubuntu.com/q/270011/169736
– Braiam
Jul 26 '13 at 13:03
@Braiam, I've found this question before. The answers are suggested to reinstall python. I've tried, and failed. Thanks anyway!
– Java Xu
Jul 29 '13 at 6:19
@Braiam, I've found this question before. The answers are suggested to reinstall python. I've tried, and failed. Thanks anyway!
– Java Xu
Jul 29 '13 at 6:19
sudo apt-get clean helps to get some space back
– frlan
Jan 6 '17 at 13:48
sudo apt-get clean helps to get some space back
– frlan
Jan 6 '17 at 13:48
I changed my
/usr/bin/python
symlink to point to python3.5
and it caused a very similar error to this. Not sure why, probably to do with already having python2.7
deps that got broken when I changed the symlink without warning. IDK, leaving this here for future travelers– tenCupMaximum
Aug 22 '17 at 22:39
I changed my
/usr/bin/python
symlink to point to python3.5
and it caused a very similar error to this. Not sure why, probably to do with already having python2.7
deps that got broken when I changed the symlink without warning. IDK, leaving this here for future travelers– tenCupMaximum
Aug 22 '17 at 22:39
add a comment |
4 Answers
4
active
oldest
votes
Follow the solution by Soroosh. Broken python (2.7) after manually building and installing python 2.6
Enter sudo -i
for root access.
Paste the command and wait about 20 minutes. Runs perfectly.
for pkg in $(dpkg --get-selections | egrep -v 'deinstall' | egrep python | awk '{print $1}'); do apt-get -y --force-yes install --reinstall $pkg ; done
add a comment |
OK, going through the packages, I found that python-minimal does not have struct.py, but python-minimal2.7 does.
So, try this and see if it helps you out:
sudo apt-get install --reinstall python2.7-minimal
sudo apt-get upgrade
If even that does't work, perhaps your $PYTHONPATH is messed up somehow.
nano ~/.bashrc
Add the line export PYTHONPATH="${PYTHONPATH}:/usr/lib/python2.7"
then
source ~/.bashrc
And try your update yet again.
edited to add "export", it's kind of necessary ;)
– Chuck R
Aug 12 '13 at 8:47
It says "Unable to locate package python-minimal2.7". Do you mean python2.7-minimal? When I try to reinstall python2.7-minimal, the same dependency problem occurs.
– Java Xu
Aug 13 '13 at 11:08
Hmm, sorry it took so long for me to get back to you. Trysudo apt-get clean
sudo apt-get update
sudo apt-get upgrade
.
– Chuck R
Aug 13 '13 at 21:31
1
I'm afraid that it doesn't work. Afterclean
,update
andupgrade
, then I try to reinstallpython2.7-minimal
, but the same dependency problem appears and thereinstall
fails again.
– Java Xu
Aug 14 '13 at 2:47
Looks like I was wrong about which package. it's actually libpython2.7-minimal that contains struct.py. Make sure that's installed. What is the current version of python2.7-minimal that you have installed? Hint:dpkg -l | grep python2.7-minimal
– Chuck R
Aug 14 '13 at 3:01
|
show 5 more comments
Try this
sudo apt purge libpython*
I removed python2.7 and 3.7, then deleted related files from the system.
After that I found I can't reinstall python2.7
Tried many methods still not working, including :
remove soft links
del virtual env dirs
autoremove
sudo dpkg --purge `dpkg --get-selections | grep deinstall | cut -f1`
Then I found some libpython files by searching python whole system.(Do not rm files from dir if you are not sure.)
After removed libpython* packages(I removed them one by one.), python installed successfully.
Hope this can help some people have same problems
add a comment |
Don't know if this is going to help you out at all, it's a bit of a stab in the dark, but make sure your default Python version is set to 2.7.
There are three files of concern in /usr/bin:
python (symlink)
python2.7
python3 (symlink)
If you do ls -l /usr/bin | grep python
you will see what each symlink points to.
If it shows you python -> python3
or python -> python3.3
there's something wrong. At this point you will want to:
rm /usr/bin/python
ln -s /usr/bin/python2.7 /usr/bin/python
Thanks for your reply. In my/usr/bin
,python
is soft-linked topython2.7
.
– Java Xu
Aug 12 '13 at 2:00
Why is this? I had changed my symlink to point topython3.5
, and it borked a huge amount of python packages andapt
as well. Why can't I default to Python3? What is the correct way?
– tenCupMaximum
Aug 22 '17 at 22:38
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f324202%2fdpkg-error-processing-python-minimal-configure%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
Follow the solution by Soroosh. Broken python (2.7) after manually building and installing python 2.6
Enter sudo -i
for root access.
Paste the command and wait about 20 minutes. Runs perfectly.
for pkg in $(dpkg --get-selections | egrep -v 'deinstall' | egrep python | awk '{print $1}'); do apt-get -y --force-yes install --reinstall $pkg ; done
add a comment |
Follow the solution by Soroosh. Broken python (2.7) after manually building and installing python 2.6
Enter sudo -i
for root access.
Paste the command and wait about 20 minutes. Runs perfectly.
for pkg in $(dpkg --get-selections | egrep -v 'deinstall' | egrep python | awk '{print $1}'); do apt-get -y --force-yes install --reinstall $pkg ; done
add a comment |
Follow the solution by Soroosh. Broken python (2.7) after manually building and installing python 2.6
Enter sudo -i
for root access.
Paste the command and wait about 20 minutes. Runs perfectly.
for pkg in $(dpkg --get-selections | egrep -v 'deinstall' | egrep python | awk '{print $1}'); do apt-get -y --force-yes install --reinstall $pkg ; done
Follow the solution by Soroosh. Broken python (2.7) after manually building and installing python 2.6
Enter sudo -i
for root access.
Paste the command and wait about 20 minutes. Runs perfectly.
for pkg in $(dpkg --get-selections | egrep -v 'deinstall' | egrep python | awk '{print $1}'); do apt-get -y --force-yes install --reinstall $pkg ; done
edited Apr 13 '17 at 12:24
Community♦
1
1
answered Dec 11 '14 at 18:46
Leo PimentelLeo Pimentel
7112
7112
add a comment |
add a comment |
OK, going through the packages, I found that python-minimal does not have struct.py, but python-minimal2.7 does.
So, try this and see if it helps you out:
sudo apt-get install --reinstall python2.7-minimal
sudo apt-get upgrade
If even that does't work, perhaps your $PYTHONPATH is messed up somehow.
nano ~/.bashrc
Add the line export PYTHONPATH="${PYTHONPATH}:/usr/lib/python2.7"
then
source ~/.bashrc
And try your update yet again.
edited to add "export", it's kind of necessary ;)
– Chuck R
Aug 12 '13 at 8:47
It says "Unable to locate package python-minimal2.7". Do you mean python2.7-minimal? When I try to reinstall python2.7-minimal, the same dependency problem occurs.
– Java Xu
Aug 13 '13 at 11:08
Hmm, sorry it took so long for me to get back to you. Trysudo apt-get clean
sudo apt-get update
sudo apt-get upgrade
.
– Chuck R
Aug 13 '13 at 21:31
1
I'm afraid that it doesn't work. Afterclean
,update
andupgrade
, then I try to reinstallpython2.7-minimal
, but the same dependency problem appears and thereinstall
fails again.
– Java Xu
Aug 14 '13 at 2:47
Looks like I was wrong about which package. it's actually libpython2.7-minimal that contains struct.py. Make sure that's installed. What is the current version of python2.7-minimal that you have installed? Hint:dpkg -l | grep python2.7-minimal
– Chuck R
Aug 14 '13 at 3:01
|
show 5 more comments
OK, going through the packages, I found that python-minimal does not have struct.py, but python-minimal2.7 does.
So, try this and see if it helps you out:
sudo apt-get install --reinstall python2.7-minimal
sudo apt-get upgrade
If even that does't work, perhaps your $PYTHONPATH is messed up somehow.
nano ~/.bashrc
Add the line export PYTHONPATH="${PYTHONPATH}:/usr/lib/python2.7"
then
source ~/.bashrc
And try your update yet again.
edited to add "export", it's kind of necessary ;)
– Chuck R
Aug 12 '13 at 8:47
It says "Unable to locate package python-minimal2.7". Do you mean python2.7-minimal? When I try to reinstall python2.7-minimal, the same dependency problem occurs.
– Java Xu
Aug 13 '13 at 11:08
Hmm, sorry it took so long for me to get back to you. Trysudo apt-get clean
sudo apt-get update
sudo apt-get upgrade
.
– Chuck R
Aug 13 '13 at 21:31
1
I'm afraid that it doesn't work. Afterclean
,update
andupgrade
, then I try to reinstallpython2.7-minimal
, but the same dependency problem appears and thereinstall
fails again.
– Java Xu
Aug 14 '13 at 2:47
Looks like I was wrong about which package. it's actually libpython2.7-minimal that contains struct.py. Make sure that's installed. What is the current version of python2.7-minimal that you have installed? Hint:dpkg -l | grep python2.7-minimal
– Chuck R
Aug 14 '13 at 3:01
|
show 5 more comments
OK, going through the packages, I found that python-minimal does not have struct.py, but python-minimal2.7 does.
So, try this and see if it helps you out:
sudo apt-get install --reinstall python2.7-minimal
sudo apt-get upgrade
If even that does't work, perhaps your $PYTHONPATH is messed up somehow.
nano ~/.bashrc
Add the line export PYTHONPATH="${PYTHONPATH}:/usr/lib/python2.7"
then
source ~/.bashrc
And try your update yet again.
OK, going through the packages, I found that python-minimal does not have struct.py, but python-minimal2.7 does.
So, try this and see if it helps you out:
sudo apt-get install --reinstall python2.7-minimal
sudo apt-get upgrade
If even that does't work, perhaps your $PYTHONPATH is messed up somehow.
nano ~/.bashrc
Add the line export PYTHONPATH="${PYTHONPATH}:/usr/lib/python2.7"
then
source ~/.bashrc
And try your update yet again.
edited Nov 7 '18 at 2:51
answered Aug 12 '13 at 7:17
Chuck RChuck R
4,25811935
4,25811935
edited to add "export", it's kind of necessary ;)
– Chuck R
Aug 12 '13 at 8:47
It says "Unable to locate package python-minimal2.7". Do you mean python2.7-minimal? When I try to reinstall python2.7-minimal, the same dependency problem occurs.
– Java Xu
Aug 13 '13 at 11:08
Hmm, sorry it took so long for me to get back to you. Trysudo apt-get clean
sudo apt-get update
sudo apt-get upgrade
.
– Chuck R
Aug 13 '13 at 21:31
1
I'm afraid that it doesn't work. Afterclean
,update
andupgrade
, then I try to reinstallpython2.7-minimal
, but the same dependency problem appears and thereinstall
fails again.
– Java Xu
Aug 14 '13 at 2:47
Looks like I was wrong about which package. it's actually libpython2.7-minimal that contains struct.py. Make sure that's installed. What is the current version of python2.7-minimal that you have installed? Hint:dpkg -l | grep python2.7-minimal
– Chuck R
Aug 14 '13 at 3:01
|
show 5 more comments
edited to add "export", it's kind of necessary ;)
– Chuck R
Aug 12 '13 at 8:47
It says "Unable to locate package python-minimal2.7". Do you mean python2.7-minimal? When I try to reinstall python2.7-minimal, the same dependency problem occurs.
– Java Xu
Aug 13 '13 at 11:08
Hmm, sorry it took so long for me to get back to you. Trysudo apt-get clean
sudo apt-get update
sudo apt-get upgrade
.
– Chuck R
Aug 13 '13 at 21:31
1
I'm afraid that it doesn't work. Afterclean
,update
andupgrade
, then I try to reinstallpython2.7-minimal
, but the same dependency problem appears and thereinstall
fails again.
– Java Xu
Aug 14 '13 at 2:47
Looks like I was wrong about which package. it's actually libpython2.7-minimal that contains struct.py. Make sure that's installed. What is the current version of python2.7-minimal that you have installed? Hint:dpkg -l | grep python2.7-minimal
– Chuck R
Aug 14 '13 at 3:01
edited to add "export", it's kind of necessary ;)
– Chuck R
Aug 12 '13 at 8:47
edited to add "export", it's kind of necessary ;)
– Chuck R
Aug 12 '13 at 8:47
It says "Unable to locate package python-minimal2.7". Do you mean python2.7-minimal? When I try to reinstall python2.7-minimal, the same dependency problem occurs.
– Java Xu
Aug 13 '13 at 11:08
It says "Unable to locate package python-minimal2.7". Do you mean python2.7-minimal? When I try to reinstall python2.7-minimal, the same dependency problem occurs.
– Java Xu
Aug 13 '13 at 11:08
Hmm, sorry it took so long for me to get back to you. Try
sudo apt-get clean
sudo apt-get update
sudo apt-get upgrade
.– Chuck R
Aug 13 '13 at 21:31
Hmm, sorry it took so long for me to get back to you. Try
sudo apt-get clean
sudo apt-get update
sudo apt-get upgrade
.– Chuck R
Aug 13 '13 at 21:31
1
1
I'm afraid that it doesn't work. After
clean
, update
and upgrade
, then I try to reinstall python2.7-minimal
, but the same dependency problem appears and the reinstall
fails again.– Java Xu
Aug 14 '13 at 2:47
I'm afraid that it doesn't work. After
clean
, update
and upgrade
, then I try to reinstall python2.7-minimal
, but the same dependency problem appears and the reinstall
fails again.– Java Xu
Aug 14 '13 at 2:47
Looks like I was wrong about which package. it's actually libpython2.7-minimal that contains struct.py. Make sure that's installed. What is the current version of python2.7-minimal that you have installed? Hint:
dpkg -l | grep python2.7-minimal
– Chuck R
Aug 14 '13 at 3:01
Looks like I was wrong about which package. it's actually libpython2.7-minimal that contains struct.py. Make sure that's installed. What is the current version of python2.7-minimal that you have installed? Hint:
dpkg -l | grep python2.7-minimal
– Chuck R
Aug 14 '13 at 3:01
|
show 5 more comments
Try this
sudo apt purge libpython*
I removed python2.7 and 3.7, then deleted related files from the system.
After that I found I can't reinstall python2.7
Tried many methods still not working, including :
remove soft links
del virtual env dirs
autoremove
sudo dpkg --purge `dpkg --get-selections | grep deinstall | cut -f1`
Then I found some libpython files by searching python whole system.(Do not rm files from dir if you are not sure.)
After removed libpython* packages(I removed them one by one.), python installed successfully.
Hope this can help some people have same problems
add a comment |
Try this
sudo apt purge libpython*
I removed python2.7 and 3.7, then deleted related files from the system.
After that I found I can't reinstall python2.7
Tried many methods still not working, including :
remove soft links
del virtual env dirs
autoremove
sudo dpkg --purge `dpkg --get-selections | grep deinstall | cut -f1`
Then I found some libpython files by searching python whole system.(Do not rm files from dir if you are not sure.)
After removed libpython* packages(I removed them one by one.), python installed successfully.
Hope this can help some people have same problems
add a comment |
Try this
sudo apt purge libpython*
I removed python2.7 and 3.7, then deleted related files from the system.
After that I found I can't reinstall python2.7
Tried many methods still not working, including :
remove soft links
del virtual env dirs
autoremove
sudo dpkg --purge `dpkg --get-selections | grep deinstall | cut -f1`
Then I found some libpython files by searching python whole system.(Do not rm files from dir if you are not sure.)
After removed libpython* packages(I removed them one by one.), python installed successfully.
Hope this can help some people have same problems
Try this
sudo apt purge libpython*
I removed python2.7 and 3.7, then deleted related files from the system.
After that I found I can't reinstall python2.7
Tried many methods still not working, including :
remove soft links
del virtual env dirs
autoremove
sudo dpkg --purge `dpkg --get-selections | grep deinstall | cut -f1`
Then I found some libpython files by searching python whole system.(Do not rm files from dir if you are not sure.)
After removed libpython* packages(I removed them one by one.), python installed successfully.
Hope this can help some people have same problems
edited Jan 25 at 16:02
answered Jan 25 at 15:55
JayJay
113
113
add a comment |
add a comment |
Don't know if this is going to help you out at all, it's a bit of a stab in the dark, but make sure your default Python version is set to 2.7.
There are three files of concern in /usr/bin:
python (symlink)
python2.7
python3 (symlink)
If you do ls -l /usr/bin | grep python
you will see what each symlink points to.
If it shows you python -> python3
or python -> python3.3
there's something wrong. At this point you will want to:
rm /usr/bin/python
ln -s /usr/bin/python2.7 /usr/bin/python
Thanks for your reply. In my/usr/bin
,python
is soft-linked topython2.7
.
– Java Xu
Aug 12 '13 at 2:00
Why is this? I had changed my symlink to point topython3.5
, and it borked a huge amount of python packages andapt
as well. Why can't I default to Python3? What is the correct way?
– tenCupMaximum
Aug 22 '17 at 22:38
add a comment |
Don't know if this is going to help you out at all, it's a bit of a stab in the dark, but make sure your default Python version is set to 2.7.
There are three files of concern in /usr/bin:
python (symlink)
python2.7
python3 (symlink)
If you do ls -l /usr/bin | grep python
you will see what each symlink points to.
If it shows you python -> python3
or python -> python3.3
there's something wrong. At this point you will want to:
rm /usr/bin/python
ln -s /usr/bin/python2.7 /usr/bin/python
Thanks for your reply. In my/usr/bin
,python
is soft-linked topython2.7
.
– Java Xu
Aug 12 '13 at 2:00
Why is this? I had changed my symlink to point topython3.5
, and it borked a huge amount of python packages andapt
as well. Why can't I default to Python3? What is the correct way?
– tenCupMaximum
Aug 22 '17 at 22:38
add a comment |
Don't know if this is going to help you out at all, it's a bit of a stab in the dark, but make sure your default Python version is set to 2.7.
There are three files of concern in /usr/bin:
python (symlink)
python2.7
python3 (symlink)
If you do ls -l /usr/bin | grep python
you will see what each symlink points to.
If it shows you python -> python3
or python -> python3.3
there's something wrong. At this point you will want to:
rm /usr/bin/python
ln -s /usr/bin/python2.7 /usr/bin/python
Don't know if this is going to help you out at all, it's a bit of a stab in the dark, but make sure your default Python version is set to 2.7.
There are three files of concern in /usr/bin:
python (symlink)
python2.7
python3 (symlink)
If you do ls -l /usr/bin | grep python
you will see what each symlink points to.
If it shows you python -> python3
or python -> python3.3
there's something wrong. At this point you will want to:
rm /usr/bin/python
ln -s /usr/bin/python2.7 /usr/bin/python
answered Aug 9 '13 at 10:37
Chuck RChuck R
4,25811935
4,25811935
Thanks for your reply. In my/usr/bin
,python
is soft-linked topython2.7
.
– Java Xu
Aug 12 '13 at 2:00
Why is this? I had changed my symlink to point topython3.5
, and it borked a huge amount of python packages andapt
as well. Why can't I default to Python3? What is the correct way?
– tenCupMaximum
Aug 22 '17 at 22:38
add a comment |
Thanks for your reply. In my/usr/bin
,python
is soft-linked topython2.7
.
– Java Xu
Aug 12 '13 at 2:00
Why is this? I had changed my symlink to point topython3.5
, and it borked a huge amount of python packages andapt
as well. Why can't I default to Python3? What is the correct way?
– tenCupMaximum
Aug 22 '17 at 22:38
Thanks for your reply. In my
/usr/bin
, python
is soft-linked to python2.7
.– Java Xu
Aug 12 '13 at 2:00
Thanks for your reply. In my
/usr/bin
, python
is soft-linked to python2.7
.– Java Xu
Aug 12 '13 at 2:00
Why is this? I had changed my symlink to point to
python3.5
, and it borked a huge amount of python packages and apt
as well. Why can't I default to Python3? What is the correct way?– tenCupMaximum
Aug 22 '17 at 22:38
Why is this? I had changed my symlink to point to
python3.5
, and it borked a huge amount of python packages and apt
as well. Why can't I default to Python3? What is the correct way?– tenCupMaximum
Aug 22 '17 at 22:38
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f324202%2fdpkg-error-processing-python-minimal-configure%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
possible duplicated of askubuntu.com/q/270011/169736
– Braiam
Jul 26 '13 at 13:03
@Braiam, I've found this question before. The answers are suggested to reinstall python. I've tried, and failed. Thanks anyway!
– Java Xu
Jul 29 '13 at 6:19
sudo apt-get clean helps to get some space back
– frlan
Jan 6 '17 at 13:48
I changed my
/usr/bin/python
symlink to point topython3.5
and it caused a very similar error to this. Not sure why, probably to do with already havingpython2.7
deps that got broken when I changed the symlink without warning. IDK, leaving this here for future travelers– tenCupMaximum
Aug 22 '17 at 22:39