Linux Mint 13 Problem - No module named site












2















My Linux Mint 13 64-bit system has developed a problem. Whilst I can run basic commands like ls and vi if I try anything more complex (I have tried python2.7, mysql-workbench and adduser) I get:-



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


I went to another system (Mint 13 32-bit) and ran:



# echo $PYTHONHOME,


and got a blank line so no idea what



<prefix>[:<exec_prefix>]


are?



Unsure where to go next?



After further Googling I tried both “sudo dpkg –configure -a” and “sudo apt-get install -f ” with the following results:-



HP-255-G1 # sudo dpkg --configure -a
dpkg: dependency problems prevent configuration of python-appindicator:
python-appindicator depends on libappindicator1 (= 0.4.92-0ubuntu1);
however:
Version of libappindicator1 on system is 0.4.92-0ubuntu1.1.
dpkg: error processing python-appindicator (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python-uno:
 python-uno depends on libreoffice-core (= 1:3.5.2-2ubuntu1); however:
Version of libreoffice-core on system is 1:3.5.7-0ubuntu7.
dpkg: error processing python-uno (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
python-appindicator
 python-uno

HP-255-G1 # sudo apt-get install -f
Reading package lists... Done
Building dependency tree      
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
python-appindicator python-uno
The following packages will be upgraded:
python-appindicator python-uno
2 upgraded, 0 newly installed, 0 to remove and 690 not upgraded.
2 not fully installed or removed.
E: Could not get lock /var/cache/apt/archives/lock - open (11: Resource temporarily unavailable)
E: Unable to lock directory /var/cache/apt/archives/


So it looks as if “python-uno” and "python-appindicator" are central to some of the issues but where to now?



Here is the requested output:-



HP-255-G1# apt-cache policy python-uno python-appindicator
python-uno:
Installed: 1:3.5.2-2ubuntu1
Candidate: 1:3.5.7-0ubuntu7
Version table:
1:3.5.7-0ubuntu7 0
500 http://archive.ubuntu.com/ubuntu/ precise-updates/main amd64 Packages
500 http://security.ubuntu.com/ubuntu/ precise-security/main amd64 Packages
*** 1:3.5.2-2ubuntu1 0
500 http://archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
100 /var/lib/dpkg/status
python-appindicator:
Installed: 0.4.92-0ubuntu1
Candidate: 0.4.92-0ubuntu1.1
Version table:
0.4.92-0ubuntu1.1 0
500 http://archive.ubuntu.com/ubuntu/ precise-updates/main amd64 Packages
*** 0.4.92-0ubuntu1 0
500 http://archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
100 /var/lib/dpkg/status


I managed to get the Synaptic Package Manager running from the command line and tried to update python-uno and python-appindicator. This failed but hopefully the output (below) is another clue:-



E: /var/cache/apt/archives/python-appindicator_0.4.92-0ubuntu1.1_amd64.deb:
subprocess new pre-removal script returned error exit status 1
E: /var/cache/apt/archives/python-uno_1%3a3.5.7-0ubuntu7_amd64.deb:
subprocess new pre-removal script returned error exit status 1









share|improve this question

























  • Have expanded after trying additional command line fixes...

    – MichaelJohn
    Feb 13 '15 at 9:40











  • Output of apt-cache policy pkg1 pkg2 where pkgi are the packages mentioned in the error messages. Paste in the question, not in the comments. And don't use a pastebin.

    – Faheem Mitha
    Feb 13 '15 at 10:07











  • No, you need to give that output for all packages mentioned. You haven't. Also, if you want to hop into the main U&L chat room (you have enough rep) this would probably be easier to sort out interactively. You can ping me once you are there.

    – Faheem Mitha
    Feb 13 '15 at 13:41


















2















My Linux Mint 13 64-bit system has developed a problem. Whilst I can run basic commands like ls and vi if I try anything more complex (I have tried python2.7, mysql-workbench and adduser) I get:-



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


I went to another system (Mint 13 32-bit) and ran:



# echo $PYTHONHOME,


and got a blank line so no idea what



<prefix>[:<exec_prefix>]


are?



Unsure where to go next?



After further Googling I tried both “sudo dpkg –configure -a” and “sudo apt-get install -f ” with the following results:-



HP-255-G1 # sudo dpkg --configure -a
dpkg: dependency problems prevent configuration of python-appindicator:
python-appindicator depends on libappindicator1 (= 0.4.92-0ubuntu1);
however:
Version of libappindicator1 on system is 0.4.92-0ubuntu1.1.
dpkg: error processing python-appindicator (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python-uno:
 python-uno depends on libreoffice-core (= 1:3.5.2-2ubuntu1); however:
Version of libreoffice-core on system is 1:3.5.7-0ubuntu7.
dpkg: error processing python-uno (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
python-appindicator
 python-uno

HP-255-G1 # sudo apt-get install -f
Reading package lists... Done
Building dependency tree      
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
python-appindicator python-uno
The following packages will be upgraded:
python-appindicator python-uno
2 upgraded, 0 newly installed, 0 to remove and 690 not upgraded.
2 not fully installed or removed.
E: Could not get lock /var/cache/apt/archives/lock - open (11: Resource temporarily unavailable)
E: Unable to lock directory /var/cache/apt/archives/


So it looks as if “python-uno” and "python-appindicator" are central to some of the issues but where to now?



Here is the requested output:-



HP-255-G1# apt-cache policy python-uno python-appindicator
python-uno:
Installed: 1:3.5.2-2ubuntu1
Candidate: 1:3.5.7-0ubuntu7
Version table:
1:3.5.7-0ubuntu7 0
500 http://archive.ubuntu.com/ubuntu/ precise-updates/main amd64 Packages
500 http://security.ubuntu.com/ubuntu/ precise-security/main amd64 Packages
*** 1:3.5.2-2ubuntu1 0
500 http://archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
100 /var/lib/dpkg/status
python-appindicator:
Installed: 0.4.92-0ubuntu1
Candidate: 0.4.92-0ubuntu1.1
Version table:
0.4.92-0ubuntu1.1 0
500 http://archive.ubuntu.com/ubuntu/ precise-updates/main amd64 Packages
*** 0.4.92-0ubuntu1 0
500 http://archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
100 /var/lib/dpkg/status


I managed to get the Synaptic Package Manager running from the command line and tried to update python-uno and python-appindicator. This failed but hopefully the output (below) is another clue:-



E: /var/cache/apt/archives/python-appindicator_0.4.92-0ubuntu1.1_amd64.deb:
subprocess new pre-removal script returned error exit status 1
E: /var/cache/apt/archives/python-uno_1%3a3.5.7-0ubuntu7_amd64.deb:
subprocess new pre-removal script returned error exit status 1









share|improve this question

























  • Have expanded after trying additional command line fixes...

    – MichaelJohn
    Feb 13 '15 at 9:40











  • Output of apt-cache policy pkg1 pkg2 where pkgi are the packages mentioned in the error messages. Paste in the question, not in the comments. And don't use a pastebin.

    – Faheem Mitha
    Feb 13 '15 at 10:07











  • No, you need to give that output for all packages mentioned. You haven't. Also, if you want to hop into the main U&L chat room (you have enough rep) this would probably be easier to sort out interactively. You can ping me once you are there.

    – Faheem Mitha
    Feb 13 '15 at 13:41
















2












2








2








My Linux Mint 13 64-bit system has developed a problem. Whilst I can run basic commands like ls and vi if I try anything more complex (I have tried python2.7, mysql-workbench and adduser) I get:-



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


I went to another system (Mint 13 32-bit) and ran:



# echo $PYTHONHOME,


and got a blank line so no idea what



<prefix>[:<exec_prefix>]


are?



Unsure where to go next?



After further Googling I tried both “sudo dpkg –configure -a” and “sudo apt-get install -f ” with the following results:-



HP-255-G1 # sudo dpkg --configure -a
dpkg: dependency problems prevent configuration of python-appindicator:
python-appindicator depends on libappindicator1 (= 0.4.92-0ubuntu1);
however:
Version of libappindicator1 on system is 0.4.92-0ubuntu1.1.
dpkg: error processing python-appindicator (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python-uno:
 python-uno depends on libreoffice-core (= 1:3.5.2-2ubuntu1); however:
Version of libreoffice-core on system is 1:3.5.7-0ubuntu7.
dpkg: error processing python-uno (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
python-appindicator
 python-uno

HP-255-G1 # sudo apt-get install -f
Reading package lists... Done
Building dependency tree      
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
python-appindicator python-uno
The following packages will be upgraded:
python-appindicator python-uno
2 upgraded, 0 newly installed, 0 to remove and 690 not upgraded.
2 not fully installed or removed.
E: Could not get lock /var/cache/apt/archives/lock - open (11: Resource temporarily unavailable)
E: Unable to lock directory /var/cache/apt/archives/


So it looks as if “python-uno” and "python-appindicator" are central to some of the issues but where to now?



Here is the requested output:-



HP-255-G1# apt-cache policy python-uno python-appindicator
python-uno:
Installed: 1:3.5.2-2ubuntu1
Candidate: 1:3.5.7-0ubuntu7
Version table:
1:3.5.7-0ubuntu7 0
500 http://archive.ubuntu.com/ubuntu/ precise-updates/main amd64 Packages
500 http://security.ubuntu.com/ubuntu/ precise-security/main amd64 Packages
*** 1:3.5.2-2ubuntu1 0
500 http://archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
100 /var/lib/dpkg/status
python-appindicator:
Installed: 0.4.92-0ubuntu1
Candidate: 0.4.92-0ubuntu1.1
Version table:
0.4.92-0ubuntu1.1 0
500 http://archive.ubuntu.com/ubuntu/ precise-updates/main amd64 Packages
*** 0.4.92-0ubuntu1 0
500 http://archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
100 /var/lib/dpkg/status


I managed to get the Synaptic Package Manager running from the command line and tried to update python-uno and python-appindicator. This failed but hopefully the output (below) is another clue:-



E: /var/cache/apt/archives/python-appindicator_0.4.92-0ubuntu1.1_amd64.deb:
subprocess new pre-removal script returned error exit status 1
E: /var/cache/apt/archives/python-uno_1%3a3.5.7-0ubuntu7_amd64.deb:
subprocess new pre-removal script returned error exit status 1









share|improve this question
















My Linux Mint 13 64-bit system has developed a problem. Whilst I can run basic commands like ls and vi if I try anything more complex (I have tried python2.7, mysql-workbench and adduser) I get:-



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


I went to another system (Mint 13 32-bit) and ran:



# echo $PYTHONHOME,


and got a blank line so no idea what



<prefix>[:<exec_prefix>]


are?



Unsure where to go next?



After further Googling I tried both “sudo dpkg –configure -a” and “sudo apt-get install -f ” with the following results:-



HP-255-G1 # sudo dpkg --configure -a
dpkg: dependency problems prevent configuration of python-appindicator:
python-appindicator depends on libappindicator1 (= 0.4.92-0ubuntu1);
however:
Version of libappindicator1 on system is 0.4.92-0ubuntu1.1.
dpkg: error processing python-appindicator (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python-uno:
 python-uno depends on libreoffice-core (= 1:3.5.2-2ubuntu1); however:
Version of libreoffice-core on system is 1:3.5.7-0ubuntu7.
dpkg: error processing python-uno (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
python-appindicator
 python-uno

HP-255-G1 # sudo apt-get install -f
Reading package lists... Done
Building dependency tree      
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
python-appindicator python-uno
The following packages will be upgraded:
python-appindicator python-uno
2 upgraded, 0 newly installed, 0 to remove and 690 not upgraded.
2 not fully installed or removed.
E: Could not get lock /var/cache/apt/archives/lock - open (11: Resource temporarily unavailable)
E: Unable to lock directory /var/cache/apt/archives/


So it looks as if “python-uno” and "python-appindicator" are central to some of the issues but where to now?



Here is the requested output:-



HP-255-G1# apt-cache policy python-uno python-appindicator
python-uno:
Installed: 1:3.5.2-2ubuntu1
Candidate: 1:3.5.7-0ubuntu7
Version table:
1:3.5.7-0ubuntu7 0
500 http://archive.ubuntu.com/ubuntu/ precise-updates/main amd64 Packages
500 http://security.ubuntu.com/ubuntu/ precise-security/main amd64 Packages
*** 1:3.5.2-2ubuntu1 0
500 http://archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
100 /var/lib/dpkg/status
python-appindicator:
Installed: 0.4.92-0ubuntu1
Candidate: 0.4.92-0ubuntu1.1
Version table:
0.4.92-0ubuntu1.1 0
500 http://archive.ubuntu.com/ubuntu/ precise-updates/main amd64 Packages
*** 0.4.92-0ubuntu1 0
500 http://archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
100 /var/lib/dpkg/status


I managed to get the Synaptic Package Manager running from the command line and tried to update python-uno and python-appindicator. This failed but hopefully the output (below) is another clue:-



E: /var/cache/apt/archives/python-appindicator_0.4.92-0ubuntu1.1_amd64.deb:
subprocess new pre-removal script returned error exit status 1
E: /var/cache/apt/archives/python-uno_1%3a3.5.7-0ubuntu7_amd64.deb:
subprocess new pre-removal script returned error exit status 1






linux-mint python libraries






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 30 mins ago









GAD3R

27.1k1757113




27.1k1757113










asked Feb 12 '15 at 16:53









MichaelJohnMichaelJohn

1781215




1781215













  • Have expanded after trying additional command line fixes...

    – MichaelJohn
    Feb 13 '15 at 9:40











  • Output of apt-cache policy pkg1 pkg2 where pkgi are the packages mentioned in the error messages. Paste in the question, not in the comments. And don't use a pastebin.

    – Faheem Mitha
    Feb 13 '15 at 10:07











  • No, you need to give that output for all packages mentioned. You haven't. Also, if you want to hop into the main U&L chat room (you have enough rep) this would probably be easier to sort out interactively. You can ping me once you are there.

    – Faheem Mitha
    Feb 13 '15 at 13:41





















  • Have expanded after trying additional command line fixes...

    – MichaelJohn
    Feb 13 '15 at 9:40











  • Output of apt-cache policy pkg1 pkg2 where pkgi are the packages mentioned in the error messages. Paste in the question, not in the comments. And don't use a pastebin.

    – Faheem Mitha
    Feb 13 '15 at 10:07











  • No, you need to give that output for all packages mentioned. You haven't. Also, if you want to hop into the main U&L chat room (you have enough rep) this would probably be easier to sort out interactively. You can ping me once you are there.

    – Faheem Mitha
    Feb 13 '15 at 13:41



















Have expanded after trying additional command line fixes...

– MichaelJohn
Feb 13 '15 at 9:40





Have expanded after trying additional command line fixes...

– MichaelJohn
Feb 13 '15 at 9:40













Output of apt-cache policy pkg1 pkg2 where pkgi are the packages mentioned in the error messages. Paste in the question, not in the comments. And don't use a pastebin.

– Faheem Mitha
Feb 13 '15 at 10:07





Output of apt-cache policy pkg1 pkg2 where pkgi are the packages mentioned in the error messages. Paste in the question, not in the comments. And don't use a pastebin.

– Faheem Mitha
Feb 13 '15 at 10:07













No, you need to give that output for all packages mentioned. You haven't. Also, if you want to hop into the main U&L chat room (you have enough rep) this would probably be easier to sort out interactively. You can ping me once you are there.

– Faheem Mitha
Feb 13 '15 at 13:41







No, you need to give that output for all packages mentioned. You haven't. Also, if you want to hop into the main U&L chat room (you have enough rep) this would probably be easier to sort out interactively. You can ping me once you are there.

– Faheem Mitha
Feb 13 '15 at 13:41












1 Answer
1






active

oldest

votes


















2














After discussion with the poster on chat, starting http://chat.stackexchange.com/transcript/message/20047753#20047753, it turned out the poster's machine is missing /usr/lib/python2.7, see http://chat.stackexchange.com/transcript/message/20052960#20052960. This accounts for most of the poster's problems. In particular, the errors:



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


stem from these missing libraries.



The next thing to do is to restore the base Python libraries under /usr/lib/python2.7. One way to do this is to download the deb files corresponding to python2.7, python2.7-minimal and libpython2.7, and then install them using dpkg -i. I.e.



apt-get download python2.7 python2.7-minimal libpython2.7
dpkg -i python*.deb


Once this is done, hopefully the package system will stop freaking out. Then install debsums, if it is not already installed, and restore the remaining missing files using debsums -as.






share|improve this answer


























  • Just tried to downland and got this. In and out till after 13:00 GMT and will go to forum then... # apt-get download python-2.7 python2.7-libpython2.7-minimal E: Unable to locate package python-2.7 E: Couldn't find any package by regex 'python-2.7' E: Unable to locate package python2.7-libpython2.7-minimal E: Couldn't find any package by regex 'python2.7-libpython2.7-minimal'

    – MichaelJohn
    Feb 18 '15 at 11:42













  • Don't run apt-get download as root. Only run installation commands as root. Post your /etc/apt/sources.list in the question. Make sure to run apt-get update before running any apt-get command.

    – Faheem Mitha
    Feb 18 '15 at 13:19











  • After another session (on the forum) yesterday all up and running now. Many thanks Faheem Mitha...

    – MichaelJohn
    Feb 19 '15 at 10:09











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
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: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
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
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f184504%2flinux-mint-13-problem-no-module-named-site%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









2














After discussion with the poster on chat, starting http://chat.stackexchange.com/transcript/message/20047753#20047753, it turned out the poster's machine is missing /usr/lib/python2.7, see http://chat.stackexchange.com/transcript/message/20052960#20052960. This accounts for most of the poster's problems. In particular, the errors:



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


stem from these missing libraries.



The next thing to do is to restore the base Python libraries under /usr/lib/python2.7. One way to do this is to download the deb files corresponding to python2.7, python2.7-minimal and libpython2.7, and then install them using dpkg -i. I.e.



apt-get download python2.7 python2.7-minimal libpython2.7
dpkg -i python*.deb


Once this is done, hopefully the package system will stop freaking out. Then install debsums, if it is not already installed, and restore the remaining missing files using debsums -as.






share|improve this answer


























  • Just tried to downland and got this. In and out till after 13:00 GMT and will go to forum then... # apt-get download python-2.7 python2.7-libpython2.7-minimal E: Unable to locate package python-2.7 E: Couldn't find any package by regex 'python-2.7' E: Unable to locate package python2.7-libpython2.7-minimal E: Couldn't find any package by regex 'python2.7-libpython2.7-minimal'

    – MichaelJohn
    Feb 18 '15 at 11:42













  • Don't run apt-get download as root. Only run installation commands as root. Post your /etc/apt/sources.list in the question. Make sure to run apt-get update before running any apt-get command.

    – Faheem Mitha
    Feb 18 '15 at 13:19











  • After another session (on the forum) yesterday all up and running now. Many thanks Faheem Mitha...

    – MichaelJohn
    Feb 19 '15 at 10:09
















2














After discussion with the poster on chat, starting http://chat.stackexchange.com/transcript/message/20047753#20047753, it turned out the poster's machine is missing /usr/lib/python2.7, see http://chat.stackexchange.com/transcript/message/20052960#20052960. This accounts for most of the poster's problems. In particular, the errors:



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


stem from these missing libraries.



The next thing to do is to restore the base Python libraries under /usr/lib/python2.7. One way to do this is to download the deb files corresponding to python2.7, python2.7-minimal and libpython2.7, and then install them using dpkg -i. I.e.



apt-get download python2.7 python2.7-minimal libpython2.7
dpkg -i python*.deb


Once this is done, hopefully the package system will stop freaking out. Then install debsums, if it is not already installed, and restore the remaining missing files using debsums -as.






share|improve this answer


























  • Just tried to downland and got this. In and out till after 13:00 GMT and will go to forum then... # apt-get download python-2.7 python2.7-libpython2.7-minimal E: Unable to locate package python-2.7 E: Couldn't find any package by regex 'python-2.7' E: Unable to locate package python2.7-libpython2.7-minimal E: Couldn't find any package by regex 'python2.7-libpython2.7-minimal'

    – MichaelJohn
    Feb 18 '15 at 11:42













  • Don't run apt-get download as root. Only run installation commands as root. Post your /etc/apt/sources.list in the question. Make sure to run apt-get update before running any apt-get command.

    – Faheem Mitha
    Feb 18 '15 at 13:19











  • After another session (on the forum) yesterday all up and running now. Many thanks Faheem Mitha...

    – MichaelJohn
    Feb 19 '15 at 10:09














2












2








2







After discussion with the poster on chat, starting http://chat.stackexchange.com/transcript/message/20047753#20047753, it turned out the poster's machine is missing /usr/lib/python2.7, see http://chat.stackexchange.com/transcript/message/20052960#20052960. This accounts for most of the poster's problems. In particular, the errors:



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


stem from these missing libraries.



The next thing to do is to restore the base Python libraries under /usr/lib/python2.7. One way to do this is to download the deb files corresponding to python2.7, python2.7-minimal and libpython2.7, and then install them using dpkg -i. I.e.



apt-get download python2.7 python2.7-minimal libpython2.7
dpkg -i python*.deb


Once this is done, hopefully the package system will stop freaking out. Then install debsums, if it is not already installed, and restore the remaining missing files using debsums -as.






share|improve this answer















After discussion with the poster on chat, starting http://chat.stackexchange.com/transcript/message/20047753#20047753, it turned out the poster's machine is missing /usr/lib/python2.7, see http://chat.stackexchange.com/transcript/message/20052960#20052960. This accounts for most of the poster's problems. In particular, the errors:



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


stem from these missing libraries.



The next thing to do is to restore the base Python libraries under /usr/lib/python2.7. One way to do this is to download the deb files corresponding to python2.7, python2.7-minimal and libpython2.7, and then install them using dpkg -i. I.e.



apt-get download python2.7 python2.7-minimal libpython2.7
dpkg -i python*.deb


Once this is done, hopefully the package system will stop freaking out. Then install debsums, if it is not already installed, and restore the remaining missing files using debsums -as.







share|improve this answer














share|improve this answer



share|improve this answer








edited Feb 18 '15 at 15:52

























answered Feb 16 '15 at 8:47









Faheem MithaFaheem Mitha

23.1k1882137




23.1k1882137













  • Just tried to downland and got this. In and out till after 13:00 GMT and will go to forum then... # apt-get download python-2.7 python2.7-libpython2.7-minimal E: Unable to locate package python-2.7 E: Couldn't find any package by regex 'python-2.7' E: Unable to locate package python2.7-libpython2.7-minimal E: Couldn't find any package by regex 'python2.7-libpython2.7-minimal'

    – MichaelJohn
    Feb 18 '15 at 11:42













  • Don't run apt-get download as root. Only run installation commands as root. Post your /etc/apt/sources.list in the question. Make sure to run apt-get update before running any apt-get command.

    – Faheem Mitha
    Feb 18 '15 at 13:19











  • After another session (on the forum) yesterday all up and running now. Many thanks Faheem Mitha...

    – MichaelJohn
    Feb 19 '15 at 10:09



















  • Just tried to downland and got this. In and out till after 13:00 GMT and will go to forum then... # apt-get download python-2.7 python2.7-libpython2.7-minimal E: Unable to locate package python-2.7 E: Couldn't find any package by regex 'python-2.7' E: Unable to locate package python2.7-libpython2.7-minimal E: Couldn't find any package by regex 'python2.7-libpython2.7-minimal'

    – MichaelJohn
    Feb 18 '15 at 11:42













  • Don't run apt-get download as root. Only run installation commands as root. Post your /etc/apt/sources.list in the question. Make sure to run apt-get update before running any apt-get command.

    – Faheem Mitha
    Feb 18 '15 at 13:19











  • After another session (on the forum) yesterday all up and running now. Many thanks Faheem Mitha...

    – MichaelJohn
    Feb 19 '15 at 10:09

















Just tried to downland and got this. In and out till after 13:00 GMT and will go to forum then... # apt-get download python-2.7 python2.7-libpython2.7-minimal E: Unable to locate package python-2.7 E: Couldn't find any package by regex 'python-2.7' E: Unable to locate package python2.7-libpython2.7-minimal E: Couldn't find any package by regex 'python2.7-libpython2.7-minimal'

– MichaelJohn
Feb 18 '15 at 11:42







Just tried to downland and got this. In and out till after 13:00 GMT and will go to forum then... # apt-get download python-2.7 python2.7-libpython2.7-minimal E: Unable to locate package python-2.7 E: Couldn't find any package by regex 'python-2.7' E: Unable to locate package python2.7-libpython2.7-minimal E: Couldn't find any package by regex 'python2.7-libpython2.7-minimal'

– MichaelJohn
Feb 18 '15 at 11:42















Don't run apt-get download as root. Only run installation commands as root. Post your /etc/apt/sources.list in the question. Make sure to run apt-get update before running any apt-get command.

– Faheem Mitha
Feb 18 '15 at 13:19





Don't run apt-get download as root. Only run installation commands as root. Post your /etc/apt/sources.list in the question. Make sure to run apt-get update before running any apt-get command.

– Faheem Mitha
Feb 18 '15 at 13:19













After another session (on the forum) yesterday all up and running now. Many thanks Faheem Mitha...

– MichaelJohn
Feb 19 '15 at 10:09





After another session (on the forum) yesterday all up and running now. Many thanks Faheem Mitha...

– MichaelJohn
Feb 19 '15 at 10:09


















draft saved

draft discarded




















































Thanks for contributing an answer to Unix & Linux Stack Exchange!


  • 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.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f184504%2flinux-mint-13-problem-no-module-named-site%23new-answer', 'question_page');
}
);

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







Popular posts from this blog

Loup dans la culture

How to solve the problem of ntp “Unable to contact time server” from KDE?

Connection limited (no internet access)