pip: Error installing package with executable
Environment
- pip version: 20.2.4
- Python version: 3.9.0
- OS: Windows 10 Build 20236
Description Attempting to install pip-run fails.
Expected behavior The installation of this package should succeed or a more informative error message should be provided.
How to Reproduce
I’ve installed Python with chocolatey (choco install python
), upgraded pip with py -m pip install -U pip
, then:
$ py -m pip install pip-run
Collecting pip-run
Using cached pip_run-8.2.0-py3-none-any.whl (14 kB)
Requirement already satisfied: pip>=19.3 in c:\python39\lib\site-packages (from pip-run) (20.2.4)
Installing collected packages: pip-run
WARNING: Failed to write executable - trying to use .deleteme logic
ERROR: Could not install packages due to an EnvironmentError: [WinError 2] The system cannot find the file specified: 'C:\\Python39\\Scripts\\pip-run.exe' -> 'C:\\Python3
9\\Scripts\\pip-run.exe.deleteme'
About this issue
- Original URL
- State: open
- Created 4 years ago
- Reactions: 16
- Comments: 29 (4 by maintainers)
The issue appears to be a permissions one. The error only occurs when running not as Administrator.
You can add your User in C:\Python39 folder security pannel with full access permission to solve this problem. @jaraco
I just right clicked on the python folder, went to properties and allowed the permission via security tab
בתאריך יום ג׳, 7 בדצמ׳ 2021, 18:05, מאת Cat4209 @.***>:
pip install pip-run --user this worked for me
I navigated to C:/Python311 and right clicked on the folder itself
pip install pip-run --user worked for me too
I assume you installed Python as admin as well (iirc chocolatey requires running as admin)? If so, yes this is a permission issue, pip cannot remove files (before installing the new version). I recall pip has some error handling around this (it should show a friendly message when it hits issues like this), so th main question here is why that handling did not kick in for you.
How did you do this ? Should I create a folder ?