Deleted /usr/bin/python and now the terminal doesn't runHow can I have more than one possibility in a...

Amira L'Akum not on Shabbat

Whipping heavy cream with melted chocolate

Inscriptio Labyrinthica

How fast does a character need to move to be effectively invisible?

How to draw a winding on a toroid of a circular cross section?

Who determines when road center lines are solid or dashed?

Why don't humans perceive waves as twice the frequency they are?

Word for something indicating the importance of guarding it properly

Arithmetics in LuaLaTeX

When can a polynomial be written as a polynomial function of another polynomial?

Which modern firearm should a time traveler bring to be easily reproducible for a historic civilization?

"Je suis petite, moi?", purpose of the "moi"?

is 1hr 15 minutes enough time to change terminals at Manila?

We get more abuse than anyone else

Why did Fury respond that way?

Why isn't a binary file shown as 0s and 1s?

How can one convert an expression to a string while keeping the quotation marks of strings that are part of the expression?

Necroskitter and creatures dying because of placing -1/-1 counters

Why were these characters absent in Spider-Man: Far From Home?

What did Jeremy Hunt mean by "slipped" to miss a vote?

How much water can a ship take on before sinking?

Zhora asks Deckard: "Are you for real?". Was this meant to be significant?

Software need db owner permission to master database (sql2016)

Operation Unzalgo



Deleted /usr/bin/python and now the terminal doesn't run


How can I have more than one possibility in a script's shebang line?Python not recognizing LD_LIBRARY_PATH?Debian Stable (“wheezy”): was trying to build Python 3.4, and I ran sudo make install — am I in trouble now?FreeBSD: using python3 in uwsgi instead of python2install python 3.6 from source, now dpkg is messed upTwo versions of python 2.x installed on the same systemTerminal and unity launcher is missinghow to link pip to python3I want to download Python3.6 but it is not downloadingdebian9 can't install python packages with pip3 or uninstall packages with apt






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







1















I accidentally deleted /usr/bin/python and now I can't run my terminal - gnome-terminal. When I try to run it using XTerm it says:




/usr/bin/python3: bad interpreter: no such file or directory




When I symlink /usr/bin/python3 with the Python that I downloaded then it says that I am missing some packages (for example Gi)



How can I return it back to working as it used to be?
I am running Ubuntu 16.04.



I think that the problem is that this Ubuntu version has some packages that the new python that I installed don't have.



I tried installing python3-minimal but it says that I don't have py3compile and py3clean










share|improve this question
















bumped to the homepage by Community 10 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.











  • 1





    Are you sure that /usr/bin/python is all that you deleted? On Ubuntu 16.04, AFAIK that should have just been a symbolic link to /usr/bin/python2.7 What "new python" did you install, and how, exactly?

    – steeldriver
    Nov 26 '16 at 18:59











  • I deleted all python that was under /usr/bin. By new python I meant, python 3.5. I compiled it from source and linked it to /usr/bin/python

    – Lee
    Nov 26 '16 at 19:00













  • xterm doesn't depend upon python (though the desktop may...). switching to a virtual console would let you run apt-get to restore things.

    – Thomas Dickey
    Nov 26 '16 at 19:09











  • XTerm works, but when I run apt-get it gives me "No Module Debian"..

    – Lee
    Nov 26 '16 at 19:23











  • Boot into single user mode, solve your problems there, and change to multi-user mode.

    – boardrider
    Nov 26 '16 at 22:33


















1















I accidentally deleted /usr/bin/python and now I can't run my terminal - gnome-terminal. When I try to run it using XTerm it says:




/usr/bin/python3: bad interpreter: no such file or directory




When I symlink /usr/bin/python3 with the Python that I downloaded then it says that I am missing some packages (for example Gi)



How can I return it back to working as it used to be?
I am running Ubuntu 16.04.



I think that the problem is that this Ubuntu version has some packages that the new python that I installed don't have.



I tried installing python3-minimal but it says that I don't have py3compile and py3clean










share|improve this question
















bumped to the homepage by Community 10 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.











  • 1





    Are you sure that /usr/bin/python is all that you deleted? On Ubuntu 16.04, AFAIK that should have just been a symbolic link to /usr/bin/python2.7 What "new python" did you install, and how, exactly?

    – steeldriver
    Nov 26 '16 at 18:59











  • I deleted all python that was under /usr/bin. By new python I meant, python 3.5. I compiled it from source and linked it to /usr/bin/python

    – Lee
    Nov 26 '16 at 19:00













  • xterm doesn't depend upon python (though the desktop may...). switching to a virtual console would let you run apt-get to restore things.

    – Thomas Dickey
    Nov 26 '16 at 19:09











  • XTerm works, but when I run apt-get it gives me "No Module Debian"..

    – Lee
    Nov 26 '16 at 19:23











  • Boot into single user mode, solve your problems there, and change to multi-user mode.

    – boardrider
    Nov 26 '16 at 22:33














1












1








1








I accidentally deleted /usr/bin/python and now I can't run my terminal - gnome-terminal. When I try to run it using XTerm it says:




/usr/bin/python3: bad interpreter: no such file or directory




When I symlink /usr/bin/python3 with the Python that I downloaded then it says that I am missing some packages (for example Gi)



How can I return it back to working as it used to be?
I am running Ubuntu 16.04.



I think that the problem is that this Ubuntu version has some packages that the new python that I installed don't have.



I tried installing python3-minimal but it says that I don't have py3compile and py3clean










share|improve this question
















I accidentally deleted /usr/bin/python and now I can't run my terminal - gnome-terminal. When I try to run it using XTerm it says:




/usr/bin/python3: bad interpreter: no such file or directory




When I symlink /usr/bin/python3 with the Python that I downloaded then it says that I am missing some packages (for example Gi)



How can I return it back to working as it used to be?
I am running Ubuntu 16.04.



I think that the problem is that this Ubuntu version has some packages that the new python that I installed don't have.



I tried installing python3-minimal but it says that I don't have py3compile and py3clean







ubuntu python






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 27 '16 at 0:19









techraf

4,36310 gold badges23 silver badges43 bronze badges




4,36310 gold badges23 silver badges43 bronze badges










asked Nov 26 '16 at 18:42









LeeLee

1238 bronze badges




1238 bronze badges





bumped to the homepage by Community 10 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







bumped to the homepage by Community 10 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.










  • 1





    Are you sure that /usr/bin/python is all that you deleted? On Ubuntu 16.04, AFAIK that should have just been a symbolic link to /usr/bin/python2.7 What "new python" did you install, and how, exactly?

    – steeldriver
    Nov 26 '16 at 18:59











  • I deleted all python that was under /usr/bin. By new python I meant, python 3.5. I compiled it from source and linked it to /usr/bin/python

    – Lee
    Nov 26 '16 at 19:00













  • xterm doesn't depend upon python (though the desktop may...). switching to a virtual console would let you run apt-get to restore things.

    – Thomas Dickey
    Nov 26 '16 at 19:09











  • XTerm works, but when I run apt-get it gives me "No Module Debian"..

    – Lee
    Nov 26 '16 at 19:23











  • Boot into single user mode, solve your problems there, and change to multi-user mode.

    – boardrider
    Nov 26 '16 at 22:33














  • 1





    Are you sure that /usr/bin/python is all that you deleted? On Ubuntu 16.04, AFAIK that should have just been a symbolic link to /usr/bin/python2.7 What "new python" did you install, and how, exactly?

    – steeldriver
    Nov 26 '16 at 18:59











  • I deleted all python that was under /usr/bin. By new python I meant, python 3.5. I compiled it from source and linked it to /usr/bin/python

    – Lee
    Nov 26 '16 at 19:00













  • xterm doesn't depend upon python (though the desktop may...). switching to a virtual console would let you run apt-get to restore things.

    – Thomas Dickey
    Nov 26 '16 at 19:09











  • XTerm works, but when I run apt-get it gives me "No Module Debian"..

    – Lee
    Nov 26 '16 at 19:23











  • Boot into single user mode, solve your problems there, and change to multi-user mode.

    – boardrider
    Nov 26 '16 at 22:33








1




1





Are you sure that /usr/bin/python is all that you deleted? On Ubuntu 16.04, AFAIK that should have just been a symbolic link to /usr/bin/python2.7 What "new python" did you install, and how, exactly?

– steeldriver
Nov 26 '16 at 18:59





Are you sure that /usr/bin/python is all that you deleted? On Ubuntu 16.04, AFAIK that should have just been a symbolic link to /usr/bin/python2.7 What "new python" did you install, and how, exactly?

– steeldriver
Nov 26 '16 at 18:59













I deleted all python that was under /usr/bin. By new python I meant, python 3.5. I compiled it from source and linked it to /usr/bin/python

– Lee
Nov 26 '16 at 19:00







I deleted all python that was under /usr/bin. By new python I meant, python 3.5. I compiled it from source and linked it to /usr/bin/python

– Lee
Nov 26 '16 at 19:00















xterm doesn't depend upon python (though the desktop may...). switching to a virtual console would let you run apt-get to restore things.

– Thomas Dickey
Nov 26 '16 at 19:09





xterm doesn't depend upon python (though the desktop may...). switching to a virtual console would let you run apt-get to restore things.

– Thomas Dickey
Nov 26 '16 at 19:09













XTerm works, but when I run apt-get it gives me "No Module Debian"..

– Lee
Nov 26 '16 at 19:23





XTerm works, but when I run apt-get it gives me "No Module Debian"..

– Lee
Nov 26 '16 at 19:23













Boot into single user mode, solve your problems there, and change to multi-user mode.

– boardrider
Nov 26 '16 at 22:33





Boot into single user mode, solve your problems there, and change to multi-user mode.

– boardrider
Nov 26 '16 at 22:33










1 Answer
1






active

oldest

votes


















0














Turns out that when I installed python from source, it didn't look at dist-packages which is where the debian module was.
So, I copied all the files from dist-packages to site-packages.
And then linked python3 to /usr/bin/python
And started installing stuff again..






share|improve this answer


























    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%2f326236%2fdeleted-usr-bin-python-and-now-the-terminal-doesnt-run%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









    0














    Turns out that when I installed python from source, it didn't look at dist-packages which is where the debian module was.
    So, I copied all the files from dist-packages to site-packages.
    And then linked python3 to /usr/bin/python
    And started installing stuff again..






    share|improve this answer




























      0














      Turns out that when I installed python from source, it didn't look at dist-packages which is where the debian module was.
      So, I copied all the files from dist-packages to site-packages.
      And then linked python3 to /usr/bin/python
      And started installing stuff again..






      share|improve this answer


























        0












        0








        0







        Turns out that when I installed python from source, it didn't look at dist-packages which is where the debian module was.
        So, I copied all the files from dist-packages to site-packages.
        And then linked python3 to /usr/bin/python
        And started installing stuff again..






        share|improve this answer













        Turns out that when I installed python from source, it didn't look at dist-packages which is where the debian module was.
        So, I copied all the files from dist-packages to site-packages.
        And then linked python3 to /usr/bin/python
        And started installing stuff again..







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 26 '16 at 23:19









        LeeLee

        1238 bronze badges




        1238 bronze badges






























            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%2f326236%2fdeleted-usr-bin-python-and-now-the-terminal-doesnt-run%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

            Taj Mahal Inhaltsverzeichnis Aufbau | Geschichte | 350-Jahr-Feier | Heutige Bedeutung | Siehe auch |...

            Baia Sprie Cuprins Etimologie | Istorie | Demografie | Politică și administrație | Arii naturale...

            Nicolae Petrescu-Găină Cuprins Biografie | Opera | In memoriam | Varia | Controverse, incertitudini...