pypa/pip

Error when %TEMP% is a junction to a dir on a letter-less drive

Open

#10,597 opened on Oct 18, 2021

View on GitHub
 (6 comments) (0 reactions) (0 assignees)Python (8,952 stars) (3,032 forks)batch import
OS: windowshelp wantedtype: bug

Description

Description

Error when %TEMP% is a junction to a dir on a letter-less drive.

The error looks similar to jazzband/pip-tools#1061, but in pip itself.

Expected behavior

Successful install/reinstall

pip version

21.3

Python version

3.10.0, 3.9.6, 3.8.2

OS

Windows 10 x64

How to Reproduce

  1. Create a volume and don't assign a letter to it
  2. Create dir on this volume
  3. Create a junction on this dir: ln--junction junction ‪\\?\Volume{<new volume uuid>}\dir
  4. set TEMP=%cd%\junction
  5. Install some package: pip3 install CrossMap

Output

Traceback (most recent call last):
  File "<python_install_dir>\lib\site-packages\pip\_internal\cli\base_command.py", line 164, in exc_logging_wrapper
    status = run_func(*args)
  File "<python_install_dir>\lib\site-packages\pip\_internal\cli\req_command.py", line 204, in wrapper
    return func(self, options, args)
  File "<python_install_dir>\lib\site-packages\pip\_internal\commands\install.py", line 294, in run
    wheel_cache = WheelCache(options.cache_dir, options.format_control)
  File "<python_install_dir>\lib\site-packages\pip\_internal\cache.py", line 219, in __init__
    self._ephem_cache = EphemWheelCache(format_control)
  File "<python_install_dir>\lib\site-packages\pip\_internal\cache.py", line 196, in __init__
    super().__init__(self._temp_dir.path, format_control)
  File "<python_install_dir>\lib\site-packages\pip\_internal\cache.py", line 121, in __init__
    super().__init__(cache_dir, format_control, {"binary"})
  File "<python_install_dir>\lib\site-packages\pip\_internal\cache.py", line 44, in __init__
    assert not cache_dir or os.path.isabs(cache_dir)
AssertionError

Code of Conduct

Contributor guide

Error when %TEMP% is a junction to a dir on a letter-less drive · pypa/pip#10597 | Good First Issue