How to uninstall Python from pip The 2019 Stack Overflow Developer Survey Results Are In Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)pyvenv vs venv vs python-virtualenv vs virtualenv and python 3apt-get install python-xxx vs pip installUninstall virtualenv which was installed through sudo pipPython 2 Ubuntu default, pip, and virtualenvUbuntu PIP Installs Packages Globally Instead of Inside VirtualEnvuninstall pyzmqUninstall jupyter with pippython package manager - avoiding conflicts with apt-getRemove old versions of Python and pipUsing apt-get or pip version of virtualenv and numpy

Can the DM override racial traits?

Simulating Exploding Dice

What's the point in a preamp?

Does Parliament hold absolute power in the UK?

Simulation of a banking system with an Account class in C++

How do I add random spotting to the same face in cycles?

Why can't devices on different VLANs, but on the same subnet, communicate?

Was credit for the black hole image misattributed?

Python - Fishing Simulator

Why does the Event Horizon Telescope (EHT) not include telescopes from Africa, Asia or Australia?

Why is superheterodyning better than direct conversion?

Are my PIs rude or am I just being too sensitive?

How did the audience guess the pentatonic scale in Bobby McFerrin's presentation?

How is simplicity better than precision and clarity in prose?

Can a 1st-level character have an ability score above 18?

Searching for a differential characteristic (differential cryptanalysis)

I could not break this equation. Please help me

What aspect of planet Earth must be changed to prevent the industrial revolution?

Do warforged have souls?

How to stretch delimiters to envolve matrices inside of a kbordermatrix?

The variadic template constructor of my class cannot modify my class members, why is that so?

How to remove this toilet supply line that seems to have no nut?

Single author papers against my advisor's will?

Finding the path in a graph from A to B then back to A with a minimum of shared edges



How to uninstall Python from pip



The 2019 Stack Overflow Developer Survey Results Are In
Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)pyvenv vs venv vs python-virtualenv vs virtualenv and python 3apt-get install python-xxx vs pip installUninstall virtualenv which was installed through sudo pipPython 2 Ubuntu default, pip, and virtualenvUbuntu PIP Installs Packages Globally Instead of Inside VirtualEnvuninstall pyzmqUninstall jupyter with pippython package manager - avoiding conflicts with apt-getRemove old versions of Python and pipUsing apt-get or pip version of virtualenv and numpy



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








1















My default Python installation is from pip which is at 2.7.10. apt-get has already Python 2.7.13 installed. I don't want to keep both installations because it's confusing, and I would prefer to keep the apt-get one because I'm more familiar with it. Can pip use the Python installation from apt-get?

Trying to uninstall pip Python, I get:



pedro@gordo-002528460857:~$ pip uninstall python
Cannot uninstall 'Python'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.


What's the best way to work this out?

If you have any better advice, I'm happy to take it because I don't work regularly with Python, so I don't know the best practices here.



EDIT:

This is how I see that the 2.7.10 is from pip and not from apt-get:
enter image description here



EDIT 2*:

More info from the .bashrc:



export PATH="~/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"


And also:



pedro@gordo-002528460857:~$ which pip
/home/pedro/.pyenv/shims/pip









share|improve this question
























  • Does pip list list both python installations? Try uninstalling with specific version like pip uninstall python==2.7.10

    – beginer
    Apr 8 at 1:43











  • That uninstall command didn't work (same error I get). Running pip list doesn't show any python version on the list. What does that mean?

    – Pedro Gordo
    Apr 8 at 11:03











  • Sorry I drifted away earlier, you can't install python with pip :-p . So back to the initial question, how did you install the python version 2.7.10, was it built from source code?

    – beginer
    Apr 9 at 3:26











  • @beginer I can't remember lol... :) How can I figure that out?

    – Pedro Gordo
    Apr 9 at 9:42






  • 1





    yes remove those lines. I'll right an answer so that you can upvote and select as correct answer :-p

    – beginer
    2 days ago

















1















My default Python installation is from pip which is at 2.7.10. apt-get has already Python 2.7.13 installed. I don't want to keep both installations because it's confusing, and I would prefer to keep the apt-get one because I'm more familiar with it. Can pip use the Python installation from apt-get?

Trying to uninstall pip Python, I get:



pedro@gordo-002528460857:~$ pip uninstall python
Cannot uninstall 'Python'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.


What's the best way to work this out?

If you have any better advice, I'm happy to take it because I don't work regularly with Python, so I don't know the best practices here.



EDIT:

This is how I see that the 2.7.10 is from pip and not from apt-get:
enter image description here



EDIT 2*:

More info from the .bashrc:



export PATH="~/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"


And also:



pedro@gordo-002528460857:~$ which pip
/home/pedro/.pyenv/shims/pip









share|improve this question
























  • Does pip list list both python installations? Try uninstalling with specific version like pip uninstall python==2.7.10

    – beginer
    Apr 8 at 1:43











  • That uninstall command didn't work (same error I get). Running pip list doesn't show any python version on the list. What does that mean?

    – Pedro Gordo
    Apr 8 at 11:03











  • Sorry I drifted away earlier, you can't install python with pip :-p . So back to the initial question, how did you install the python version 2.7.10, was it built from source code?

    – beginer
    Apr 9 at 3:26











  • @beginer I can't remember lol... :) How can I figure that out?

    – Pedro Gordo
    Apr 9 at 9:42






  • 1





    yes remove those lines. I'll right an answer so that you can upvote and select as correct answer :-p

    – beginer
    2 days ago













1












1








1








My default Python installation is from pip which is at 2.7.10. apt-get has already Python 2.7.13 installed. I don't want to keep both installations because it's confusing, and I would prefer to keep the apt-get one because I'm more familiar with it. Can pip use the Python installation from apt-get?

Trying to uninstall pip Python, I get:



pedro@gordo-002528460857:~$ pip uninstall python
Cannot uninstall 'Python'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.


What's the best way to work this out?

If you have any better advice, I'm happy to take it because I don't work regularly with Python, so I don't know the best practices here.



EDIT:

This is how I see that the 2.7.10 is from pip and not from apt-get:
enter image description here



EDIT 2*:

More info from the .bashrc:



export PATH="~/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"


And also:



pedro@gordo-002528460857:~$ which pip
/home/pedro/.pyenv/shims/pip









share|improve this question
















My default Python installation is from pip which is at 2.7.10. apt-get has already Python 2.7.13 installed. I don't want to keep both installations because it's confusing, and I would prefer to keep the apt-get one because I'm more familiar with it. Can pip use the Python installation from apt-get?

Trying to uninstall pip Python, I get:



pedro@gordo-002528460857:~$ pip uninstall python
Cannot uninstall 'Python'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.


What's the best way to work this out?

If you have any better advice, I'm happy to take it because I don't work regularly with Python, so I don't know the best practices here.



EDIT:

This is how I see that the 2.7.10 is from pip and not from apt-get:
enter image description here



EDIT 2*:

More info from the .bashrc:



export PATH="~/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"


And also:



pedro@gordo-002528460857:~$ which pip
/home/pedro/.pyenv/shims/pip






apt package-management python pip






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 2 days ago







Pedro Gordo

















asked Apr 7 at 15:43









Pedro GordoPedro Gordo

1911418




1911418












  • Does pip list list both python installations? Try uninstalling with specific version like pip uninstall python==2.7.10

    – beginer
    Apr 8 at 1:43











  • That uninstall command didn't work (same error I get). Running pip list doesn't show any python version on the list. What does that mean?

    – Pedro Gordo
    Apr 8 at 11:03











  • Sorry I drifted away earlier, you can't install python with pip :-p . So back to the initial question, how did you install the python version 2.7.10, was it built from source code?

    – beginer
    Apr 9 at 3:26











  • @beginer I can't remember lol... :) How can I figure that out?

    – Pedro Gordo
    Apr 9 at 9:42






  • 1





    yes remove those lines. I'll right an answer so that you can upvote and select as correct answer :-p

    – beginer
    2 days ago

















  • Does pip list list both python installations? Try uninstalling with specific version like pip uninstall python==2.7.10

    – beginer
    Apr 8 at 1:43











  • That uninstall command didn't work (same error I get). Running pip list doesn't show any python version on the list. What does that mean?

    – Pedro Gordo
    Apr 8 at 11:03











  • Sorry I drifted away earlier, you can't install python with pip :-p . So back to the initial question, how did you install the python version 2.7.10, was it built from source code?

    – beginer
    Apr 9 at 3:26











  • @beginer I can't remember lol... :) How can I figure that out?

    – Pedro Gordo
    Apr 9 at 9:42






  • 1





    yes remove those lines. I'll right an answer so that you can upvote and select as correct answer :-p

    – beginer
    2 days ago
















Does pip list list both python installations? Try uninstalling with specific version like pip uninstall python==2.7.10

– beginer
Apr 8 at 1:43





Does pip list list both python installations? Try uninstalling with specific version like pip uninstall python==2.7.10

– beginer
Apr 8 at 1:43













That uninstall command didn't work (same error I get). Running pip list doesn't show any python version on the list. What does that mean?

– Pedro Gordo
Apr 8 at 11:03





That uninstall command didn't work (same error I get). Running pip list doesn't show any python version on the list. What does that mean?

– Pedro Gordo
Apr 8 at 11:03













Sorry I drifted away earlier, you can't install python with pip :-p . So back to the initial question, how did you install the python version 2.7.10, was it built from source code?

– beginer
Apr 9 at 3:26





Sorry I drifted away earlier, you can't install python with pip :-p . So back to the initial question, how did you install the python version 2.7.10, was it built from source code?

– beginer
Apr 9 at 3:26













@beginer I can't remember lol... :) How can I figure that out?

– Pedro Gordo
Apr 9 at 9:42





@beginer I can't remember lol... :) How can I figure that out?

– Pedro Gordo
Apr 9 at 9:42




1




1





yes remove those lines. I'll right an answer so that you can upvote and select as correct answer :-p

– beginer
2 days ago





yes remove those lines. I'll right an answer so that you can upvote and select as correct answer :-p

– beginer
2 days ago










1 Answer
1






active

oldest

votes


















1














The installation info you get from pip show python is actually a python virtualenv created by you or someone else into the path ~/.pyenv/bin:$PATH and was added to bashrc so that it gets loaded by default at login. So the solution is to delete those lines from .bashrc and re-login, then you'll only see and be able to use the system python version. If you want to use that virtualenv then run the command source ~/.pyenv/bin/activate and then to exit: deactivate



At the moment that virtualenv was created, the system python version was 2.7.10, hence the version shown by pip. Later the system python was upgraded thats why you see a latest version with apt-get now. Upgrading the system python doesn't affect virtualenv, you need to rebuild it if required. There is a good discussion on this topic here






share|improve this answer























    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
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1131905%2fhow-to-uninstall-python-from-pip%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









    1














    The installation info you get from pip show python is actually a python virtualenv created by you or someone else into the path ~/.pyenv/bin:$PATH and was added to bashrc so that it gets loaded by default at login. So the solution is to delete those lines from .bashrc and re-login, then you'll only see and be able to use the system python version. If you want to use that virtualenv then run the command source ~/.pyenv/bin/activate and then to exit: deactivate



    At the moment that virtualenv was created, the system python version was 2.7.10, hence the version shown by pip. Later the system python was upgraded thats why you see a latest version with apt-get now. Upgrading the system python doesn't affect virtualenv, you need to rebuild it if required. There is a good discussion on this topic here






    share|improve this answer



























      1














      The installation info you get from pip show python is actually a python virtualenv created by you or someone else into the path ~/.pyenv/bin:$PATH and was added to bashrc so that it gets loaded by default at login. So the solution is to delete those lines from .bashrc and re-login, then you'll only see and be able to use the system python version. If you want to use that virtualenv then run the command source ~/.pyenv/bin/activate and then to exit: deactivate



      At the moment that virtualenv was created, the system python version was 2.7.10, hence the version shown by pip. Later the system python was upgraded thats why you see a latest version with apt-get now. Upgrading the system python doesn't affect virtualenv, you need to rebuild it if required. There is a good discussion on this topic here






      share|improve this answer

























        1












        1








        1







        The installation info you get from pip show python is actually a python virtualenv created by you or someone else into the path ~/.pyenv/bin:$PATH and was added to bashrc so that it gets loaded by default at login. So the solution is to delete those lines from .bashrc and re-login, then you'll only see and be able to use the system python version. If you want to use that virtualenv then run the command source ~/.pyenv/bin/activate and then to exit: deactivate



        At the moment that virtualenv was created, the system python version was 2.7.10, hence the version shown by pip. Later the system python was upgraded thats why you see a latest version with apt-get now. Upgrading the system python doesn't affect virtualenv, you need to rebuild it if required. There is a good discussion on this topic here






        share|improve this answer













        The installation info you get from pip show python is actually a python virtualenv created by you or someone else into the path ~/.pyenv/bin:$PATH and was added to bashrc so that it gets loaded by default at login. So the solution is to delete those lines from .bashrc and re-login, then you'll only see and be able to use the system python version. If you want to use that virtualenv then run the command source ~/.pyenv/bin/activate and then to exit: deactivate



        At the moment that virtualenv was created, the system python version was 2.7.10, hence the version shown by pip. Later the system python was upgraded thats why you see a latest version with apt-get now. Upgrading the system python doesn't affect virtualenv, you need to rebuild it if required. There is a good discussion on this topic here







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered 2 days ago









        beginerbeginer

        242212




        242212



























            draft saved

            draft discarded
















































            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.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1131905%2fhow-to-uninstall-python-from-pip%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

            Tamil (spriik) Luke uk diar | Nawigatjuun

            Align equal signs while including text over equalitiesAMS align: left aligned text/math plus multicolumn alignmentMultiple alignmentsAligning equations in multiple placesNumbering and aligning an equation with multiple columnsHow to align one equation with another multline equationUsing \ in environments inside the begintabularxNumber equations and preserving alignment of equal signsHow can I align equations to the left and to the right?Double equation alignment problem within align enviromentAligned within align: Why are they right-aligned?

            Training a classifier when some of the features are unknownWhy does Gradient Boosting regression predict negative values when there are no negative y-values in my training set?How to improve an existing (trained) classifier?What is effect when I set up some self defined predisctor variables?Why Matlab neural network classification returns decimal values on prediction dataset?Fitting and transforming text data in training, testing, and validation setsHow to quantify the performance of the classifier (multi-class SVM) using the test data?How do I control for some patients providing multiple samples in my training data?Training and Test setTraining a convolutional neural network for image denoising in MatlabShouldn't an autoencoder with #(neurons in hidden layer) = #(neurons in input layer) be “perfect”?