WindowsError: [Error 5] Access is denied: Anaconda Python Pip Installs and Upgrade

I was trying to run a pip install ( pip install scikit-learn) and I encountered this error:

This is the bit we are interested in ”

if you look at the error it states “WindowsError”

Hence the Access Denied error is due to not having the right level of privileges to carry out the installs or upgrade.

SOLUTION

Open Command Prompt as Administrator (with Administrator rights)

  1. Now run your pip installs and the windowsError should disappear and installation go through

  2. Hope this helps you 🙂
Want more information like this?

Similar Posts

2 Comments

  1. I am running as administrator. Still I have this error.

    File “c:\python27\lib\site-packages\pip\_vendor\retrying.py”, line 200, in call
    attempt = Attempt(fn(*args, **kwargs), attempt_number, False)
    File “c:\python27\lib\site-packages\pip\utils\__init__.py”, line 102, in rmtree
    onerror=rmtree_errorhandler)
    File “c:\python27\lib\shutil.py”, line 252, in rmtree
    onerror(os.remove, fullname, sys.exc_info())
    File “c:\python27\lib\site-packages\pip\utils\__init__.py”, line 110, in rmtree_errorhandler
    if os.stat(path).st_mode & stat.S_IREAD:
    WindowsError: [Error 5] Access is denied: ‘c:\\users\\XXXX\\appdata\\local\\temp\\pip-vawmxw-unpack\\pytz-2017.2-py2.py3-none-any.whl’

    1. Hi Aneesh,
      Can you check that the file is not being accessed or opened by any other program.
      Sometimes the file might be accessed by another program without you realising. A simple case of restart and running command prompt as an administrator might help solve it

Leave a Reply

Your email address will not be published. Required fields are marked *