You are not logged in.

#1 2016-12-20 18:22:11

bkach
Member
Registered: 2016-12-15
Posts: 11

[Solved] Remove pip

Hi!

I installed Python's package manager (pip) using easy_install

easy_install pip

Now i would like to remove it as I'd much rather use pacman.

When trying to run

 sudo pip uninstall pip 

I get

Cannot remove entries from nonexistent file /usr/lib/python3.5/site-packages/easy-install.pth

Looking in my site packages, i happen to have found a pip-9.0.1-py.3.5.egg - and in my bin I have pip, pip3, pip3.5. If I remove those would that be considered "uninstalled" ?

Last edited by bkach (2017-06-15 07:27:47)

Offline

#2 2016-12-20 19:36:11

d0cc0m
Member
Registered: 2016-07-25
Posts: 4

Re: [Solved] Remove pip

See the easy_install documentation on uninstalling packages http://peak.telecommunity.com/DevCenter … g-packages

Offline

#3 2016-12-20 19:38:05

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: [Solved] Remove pip

This is why you don't install things as root using pip/easy_install. tongue

You can use the "lostfiles" AUR package to find files that aren't tracked with pacman.... but /usr/lib/python3.5/site-packages/pip* and /usr/bin/pip* should be everything that was installed by easy_install.


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#4 2016-12-21 01:04:01

bulletmark
Member
From: Brisbane, Australia
Registered: 2013-10-22
Posts: 675

Re: [Solved] Remove pip

Eschwartz wrote:

This is why you don't install things as root using pip/easy_install.

Exactly, so pip should only ever be run by a user. Thus if you need external packages to be installed by pip you first should install a virtual environment, i.e. run python -m venv env. By default python, since 3.4, installs env/bin/pip there anyhow! So there should never be any need to install the system package python-pip on an Arch system (and any other distro which includes python 3.4+).

Offline

#5 2016-12-21 01:12:26

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: [Solved] Remove pip

bulletmark wrote:
Eschwartz wrote:

This is why you don't install things as root using pip/easy_install.

Exactly, so pip should only ever be run by a user. Thus if you need external packages to be installed by pip you first should install a virtual environment, i.e. run python -m venv env. By default python, since 3.4, installs env/bin/pip there anyhow!

Or use `pip --user`, a perfectly valid use-case.

So there should never be any need to install the system package python-pip on an Arch system (and any other distro which includes python 3.4+).

Untrue. If for no other reason than that pip is a makedepends for any python package that is only distributed as a wheel. See the Wiki: Python package guidelines


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#6 2016-12-21 05:14:23

bulletmark
Member
From: Brisbane, Australia
Registered: 2013-10-22
Posts: 675

Re: [Solved] Remove pip

Eschwartz wrote:

Untrue. If for no other reason than that pip is a makedepends for any python package that is only distributed as a wheel.

That's when it gets installed as a dependency. Clearly you can't avoid that. We are talking here about the use case of a user installing pip for his own direct use and I still contend that is not required with modern python.

Offline

#7 2016-12-21 05:42:41

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: [Solved] Remove pip

Clearly, you completely ignored my mention of `pip --user`. And equally clearly, you (rhet.) can't avoid people moving the goalposts in any sort of discussion...

Previously you claimed that there is never a reason to have the system pip installed (and I guess you expected me to be possessed of the power of prophecy in order to know what you meant by that -- it certainly wasn't my default assumption, given that I believe pip to be a valid user-facing system tool); presumably you'd be happy for it to be deleted from the repos? hmm

It's just a tool, you can use it however you like! It is capable of installing Python packages via PyPi or tarballs, with optional dependency management, to whatever root you specify. And while it usually just makes use of setuptools under the hood, that isn't its exclusive use. The fact that the most common use is to clobber your system install location, is not some sort of inherent proof that nobody should ever have the pip executable on their system, ever. (deliberate redundancy) It isn't even some sort of inherent proof that pip should only ever be manually invoked inside a virtualenv.

Please ride your hobby horse over to some other thread. It is sufficient to warn, as I already did, against the unthinking use of pip as root, and have done with it.

Last edited by eschwartz (2016-12-21 05:54:02)


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#8 2016-12-22 09:27:15

bkach
Member
Registered: 2016-12-15
Posts: 11

Re: [Solved] Remove pip

Thanks for the help, i've successfully removed all traces of pip! Lostfiles is a gem smile.

Offline

Board footer

Powered by FluxBB