packaging.python.org icon indicating copy to clipboard operation
packaging.python.org copied to clipboard

Example from docs for "Installing from VCS" does not work

Open alvassin opened this issue 1 year ago • 3 comments

Installing from VCS example says, that python3 -m pip install -e SomeProject @ git+https://git.repo/some_pkg.git command should install package in editable mode from VCS.

Tested on Mac Ventura 13.1, on both python versions 3.12 and 3.11:

python3.12 -m venv env12
. env12/bin/activate

python3.12 -m pip install --upgrade pip 
> Requirement already satisfied: pip in ./env12/lib/python3.12/site-packages (24.0)

python3 -m pip install -e aiomisc @ git+https://github.com/aiokitchen/aiomisc.git
> ERROR: Invalid requirement: '@'

What i am doing wrong?

alvassin avatar Feb 25 '24 10:02 alvassin

You'll need to quote the requirement.

chrysle avatar Feb 25 '24 11:02 chrysle

Quoting did not help:

$ pip install -e 'aiomisc @ git+https://github.com/aiokitchen/aiomisc.git'
ERROR: aiomisc @ git+https://github.com/aiokitchen/aiomisc.git is not a valid editable requirement. It should either be a path to a local project or a VCS URL (beginning with bzr+http, bzr+https, bzr+ssh, bzr+sftp, bzr+ftp, bzr+lp, bzr+file, git+http, git+https, git+ssh, git+git, git+file, hg+file, hg+http, hg+https, hg+ssh, hg+static-http, svn+ssh, svn+http, svn+https, svn+svn, svn+file).

But this command worked:

pip install -e git+https://github.com/aiokitchen/aiomisc.git#egg=aiomisc

What do I miss?

alvassin avatar Feb 25 '24 12:02 alvassin

Ah, it looks like PEP 508 URL-based lookup syntax is not supported for editable requirements right now (see https://github.com/pypa/pip/issues/11951#issuecomment-1504821390). That section is outdated, then.

chrysle avatar Feb 25 '24 12:02 chrysle