New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid package name argument to `pip install` can output an IndexError #3523

kezabelle opened this Issue Feb 27, 2016 · 0 comments


None yet
1 participant

kezabelle commented Feb 27, 2016

pip install -e git+ will yield:

Traceback (most recent call last):
  File "/PATH/site-packages/pip/", line 209, in main
    status =, args)
  File "/PATH/site-packages/pip/commands/", line 287, in run
  File "/PATH/site-packages/pip/", line 280, in populate_requirement_set
  File "/PATH/site-packages/pip/req/", line 139, in from_editable
    editable_req, default_vcs)
  File "/PATH/site-packages/pip/req/", line 1207, in parse_editable
    req = _build_req_from_url(editable_req)
  File "/PATH/site-packages/pip/req/", line 1103, in _build_req_from_url
    if parts[-2] in ('tags', 'branches', 'tag', 'branch'):
IndexError: list index out of range

I'd meant to paste the URL, but it turns out I pasted a newline. Go me.
I assume there needs to be a guard on the length of parts before seeking the value.

> pip -V
pip 8.0.3 from /PATH/site-packages  (python 2.7)

xavfernandez added a commit to xavfernandez/pip that referenced this issue Mar 4, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment