I have asked this question on SO, but they suggested, the question is better suited for Superuser.

I installed Python 2.7.9 on Windows 7. It is supposed to have pip built-in. However, during Python installation, pip setup failed. I tried to install pip using get-pip.py, but it also failed giving the following error:

Traceback (most recent call last):
File "C:\Users\Ali\Desktop\get-pip.py", line 17853, in <module>
File "C:\Users\Ali\Desktop\get-pip.py", line 145, in main
with open(pip_zip, "wb") as fp:
IOError: [Errno 13] Permission denied: 

I searched previous answers for similar problems. They mostly refer to running cmd as administrator, which I did, but I still get the same error.
I discovered that when I try to open any file using python in write mode 'w', it fails giving me the same error. I suppose that's why pip couldn't be installed. I tried opening files in different directories, but each time it fails. This is giving me a hard time. Can somebody help me know why python can't write files on my PC?!


Exit all python related process and try again. pip cannot delete files which is currently using.

  1. Ensure that you are logged in with user "ali" and have write access to the folder c:\users\ali\appdata\local\temp\tmpe8llat\
  2. Uninstall existing Python 2.7.9 files
  3. Download and reinstall 2.7.9 files
  • Thanks for your prompt answer, but I already did all of that and still continuously getting the same error! – Ali Elbehery Apr 13 '15 at 21:37
  • When you performed the install did you do it with the Ali user account or as an Administrator? – gnp210 Apr 14 '15 at 21:58
  • Ali is an administrator account. – Ali Elbehery Apr 15 '15 at 1:02

I found that this error does not prevent the installation to be successful.

The files pip can't delete are some temporary files I believe. I usually delete them by hand from time to time.

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.