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

`pip search` doesn't work in narrow terminals #3655

tinruufu opened this Issue May 5, 2016 · 0 comments


None yet
2 participants

tinruufu commented May 5, 2016

  • Pip version: 8.1.1 (also happens in at least 8.1.0)
  • Python version: 2.7.9
  • Operating System: xenial


pip search can't print results to narrow terminal windows

What I've run:

pip search [something with results] in a 63-column urxvt instance:

Traceback (most recent call last):
  File "/home/tinruufu/.virtualenvs/tinruufu/local/lib/python2.7/site-packages/pip/", line 209, in main
    status =, args)
  File "/home/tinruufu/.virtualenvs/tinruufu/local/lib/python2.7/site-packages/pip/commands/", line 50, in run
    print_results(hits, terminal_width=terminal_width)
  File "/home/tinruufu/.virtualenvs/tinruufu/local/lib/python2.7/site-packages/pip/commands/", line 122, in print_results
    terminal_width - name_column_width - 5,
  File "/usr/lib/python2.7/", line 354, in wrap
    return w.wrap(text)
  File "/usr/lib/python2.7/", line 329, in wrap
    return self._wrap_chunks(chunks)
  File "/usr/lib/python2.7/", line 258, in _wrap_chunks
    raise ValueError("invalid width %r (must be > 0)" % self.width)
ValueError: invalid width -14 (must be > 0)
$ tput cols

as an aside, it's a bummer that the download progress bars don't get narrow in such windows and instead vomits hundreds of lines of rectangles; progressbar handles this fine. this is the first time i've found something that just straight-up doesn't work at all though

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