Closed jemrobinson closed 1 month ago
This PR does not seem to contain any modification to coverable code.
Sorry, I'm confused here. Isn't this the package that gives you the pip
executable? What's that got to do with virtual environments vs. home directories?
python-pip
provides pip globally and will by default install packages to ~/.local
or /usr/
.
It shouldn't be needed because we have python-venv
which will put pip
and setup-tools
in a virtual environment when you create it.
I think what we want to do is encourage people to always use python -m venv
(or hatch
, poetry
, etc.) then pip inside that venv, never the global pip
.
Ah OK. So python-venv
also provides pip
then? I guess symlinked into the virtualenvs when you create them?
Yes, I'm not 100% certain how that works, however the venv has pip and when you activate it pip will be added to your path. So there will be pip in the venv but not globally.
(I think this is why pip always complains about being out of date now, because you have pip pinned to your python distribution so there is likely a newer version on PyPI).
The entire content of the pip
executable is just:
#!/home/james.robinson/testvenv/bin/python
# -*- coding: utf-8 -*-
import re
import sys
from pip._internal.cli.main import main
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
sys.exit(main())
so (after testing) it looks like python-venv
just writes that to VENV_PATH/bin
. It must be installing the pip
package to site-packages
from somewhere, but I'm not sure where.
Working as intended.
:white_check_mark: Checklist
Enable foobar integration
rather than515 foobar
).develop
.:vertical_traffic_light: Depends on
n/a
:arrow_heading_up: Summary
Add
python3-pip
to the workspaces:closed_umbrella: Related issues
n/a
:microscope: Tests
Not tested