-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Closed
Labels
auto-lockedOutdated issues that have been locked by automationOutdated issues that have been locked by automation
Description
Environment
- pip version: 20.0.2
- Python version: 3.8.2
- OS: Windows 10
Description
Installing packages with non-privileged users on Windows, failed with PermissionError.
Expected behavior
Should detect site-packages folder is not writable, try install to user appdata folder instead.
How to Reproduce
Run pip install pandas with non-privileged user on windows.
Output
ERROR: Exception:
Traceback (most recent call last):
File "c:\program files (x86)\python38-32\lib\site-packages\pip\_internal\cli\base_command.py", line 186, in _main
status = self.run(options, args)
File "c:\program files (x86)\python38-32\lib\site-packages\pip\_internal\commands\install.py", line 253, in run
options.use_user_site = decide_user_install(
File "c:\program files (x86)\python38-32\lib\site-packages\pip\_internal\commands\install.py", line 604, in decide_user_install
if site_packages_writable(root=root_path, isolated=isolated_mode):
File "c:\program files (x86)\python38-32\lib\site-packages\pip\_internal\commands\install.py", line 548, in site_packages_writable
return all(
File "c:\program files (x86)\python38-32\lib\site-packages\pip\_internal\commands\install.py", line 549, in <genexpr>
test_writable_dir(d) for d in set(get_lib_location_guesses(**kwargs))
File "c:\program files (x86)\python38-32\lib\site-packages\pip\_internal\utils\filesystem.py", line 140, in test_writable_dir
return _test_writable_dir_win(path)
File "c:\program files (x86)\python38-32\lib\site-packages\pip\_internal\utils\filesystem.py", line 153, in _test_writable_dir_win
fd = os.open(file, os.O_RDWR | os.O_CREAT | os.O_EXCL)
PermissionError: [Errno 13] Permission denied: 'c:\\program files (x86)\\python38-32\\Lib\\site-packages\\accesstest_deleteme_fishfingers_custard_m59lch'
With pdb I notice os.open raise a OSError which errno is errno.EACCES.
Metadata
Metadata
Assignees
Labels
auto-lockedOutdated issues that have been locked by automationOutdated issues that have been locked by automation