Skip to content
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 show" fails when used on different disk from pip installation #10231

Closed
1 task done
JAK0723 opened this issue Jul 29, 2021 · 2 comments · Fixed by #10206
Closed
1 task done

"pip show" fails when used on different disk from pip installation #10231

JAK0723 opened this issue Jul 29, 2021 · 2 comments · Fixed by #10206
Labels
type: bug A confirmed bug or unintended behavior
Milestone

Comments

@JAK0723
Copy link

JAK0723 commented Jul 29, 2021

Description

Using the "show" command on any disk other than the one where python/pip is installed will result in an error. This bug was introduced in 21.2, it does not occur when using 21.1.3.

Expected behavior

The show command works normally, displaying information about the specified package.

pip version

21.2.1

Python version

3.9.6

OS

Windows 10 Build 19043.1110

How to Reproduce

  1. Open a terminal on a disk different from the disk where python and/or pip is installed.
  2. Then run pip show pip.
  3. Produces a ValueError.

Output

E:\> pip show pip
ERROR: Exception:
Traceback (most recent call last):
  File "c:\python\python39\lib\site-packages\pip\_internal\cli\base_command.py", line 173, in _main
    status = self.run(options, args)
  File "c:\python\python39\lib\site-packages\pip\_internal\commands\show.py", line 45, in run
    if not print_results(
  File "c:\python\python39\lib\site-packages\pip\_internal\commands\show.py", line 160, in print_results
    for i, dist in enumerate(distributions):
  File "c:\python\python39\lib\site-packages\pip\_internal\commands\show.py", line 128, in search_packages_info
    files = sorted(os.path.relpath(p, dist.location) for p in files_iter)
  File "c:\python\python39\lib\site-packages\pip\_internal\commands\show.py", line 128, in <genexpr>
    files = sorted(os.path.relpath(p, dist.location) for p in files_iter)
  File "c:\python\python39\lib\ntpath.py", line 703, in relpath
    raise ValueError("path is on mount %r, start on mount %r" % (
ValueError: path is on mount 'E:', start on mount 'c:'

Code of Conduct

@JAK0723 JAK0723 added S: needs triage Issues/PRs that need to be triaged type: bug A confirmed bug or unintended behavior labels Jul 29, 2021
@JAK0723 JAK0723 changed the title "pip show" fails on different disk "pip show" fails when used on different disk from pip installation Jul 29, 2021
@bschnei
Copy link

bschnei commented Jul 29, 2021

I believe this is related to #10204

@uranusjr
Copy link
Member

Agreed. I’m going to close this for now. Please reopen if you still encounter this in 21.2.2 (should drop in a day or two).

@uranusjr uranusjr removed the S: needs triage Issues/PRs that need to be triaged label Jul 30, 2021
@uranusjr uranusjr added this to the 21.2.2 milestone Jul 30, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 24, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug A confirmed bug or unintended behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants