How do you uninstall the package manager “pip”, if installed from source?

后端 未结 4 1958
再見小時候
再見小時候 2021-02-01 17:43

I was unaware that pip could be installed via my operating system\'s package manager, so I compiled and installed pip via source with the following command:

wget         


        
相关标签:
4条回答
  • 2021-02-01 18:07

    If you installed pip like this:

     - sudo apt install python-pip
     - sudo apt install python3-pip
    

    Uninstall them like this:

     - sudo apt remove python-pip
     - sudo apt remove python3-pip
    
    0 讨论(0)
  • 2021-02-01 18:07

    I was using above command but it was not working. This command worked for me:

    python -m pip uninstall pip setuptools
    
    0 讨论(0)
  • 2021-02-01 18:17

    pip uninstall pip will work  

    0 讨论(0)
  • 2021-02-01 18:18

    That way you haven't installed pip, you installed just the easy_install i.e. setuptools.

    First you should remove all the packages you installed with easy_install using (see uninstall):

    easy_install -m PackageName
    

    This includes pip if you installed it using easy_install pip.

    After this you remove the setuptools following the instructions from here:

    If setuptools package is found in your global site-packages directory, you may safely remove the following file/directory:

    setuptools-*.egg
    

    If setuptools is installed in some other location such as the user site directory (eg: ~/.local, ~/Library/Python or %APPDATA%), then you may safely remove the following files:

    pkg_resources.py
    easy_install.py
    setuptools/
    setuptools-*.egg-info/
    
    0 讨论(0)
提交回复
热议问题