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

  • Array Transposition – Numpy Python Data Analysis

    Welcome Guys, We will be looking at Array transposition in this quick notes. This is part of lectures on Learning Python for Data Analysis and Visualization by Jose Portilla on Udemy.   In [1]:

      In [2]:

      Out[2]:

    In [17]:

      Out[17]:

    In [10]:

      Out[10]:

    In [11]:

      Out[11]:

    In [23]:

     

  • | |

    Running a Random Forest – Data Analysis and Intrepretation

    Overview My research work deals with Ghana, a country from the Gapminder dataset as has already been discussed from the beginning and progression through this course. The variables in my observation dataset are all quantitative. For the purposes of this assignment, I have binned my quantitative target variable, Life Expectancy (lifeexpectancy) into a 2-level binary categorical target variable. I have named…

  • |

    Pandas DataFrame and Series Alignment Python Notes

    This week we have a look at Data Alignment in Python In [1]:

      In [2]:

      Out[2]:

    In [3]:

      Out[3]:

    In [4]:

      Out[4]:

    In [6]:

      Out[6]: A B LA 0 1 GA 2 3 In [10]:

      Out[10]: A B C LA 0 1 2 NYC 3 4…

  • | | |

    Deploy Productionalise Azure Machine Learning Algorithm Using Python

    This is a script to consume Azure Machine Learning Model which you build using Azure ML Studio. So basically this is a Request-Response Service (RRS)  according to Microsoft. This was a Boosted Decision Tree Algorithm build with Census Adult Data which is available as one of the Sample DataSet in Azure ML. You can adapt the…

  • Python Pandas Pivot Table Index location Percentage calculation on Two columns

    pivot table for year on year This is a quick example of how to use pivot_table,  to calculate year on year percentage sales . In [162]:

      In [163]:

     

    In [164]:

      Out[164]: First Name Last Name Sex Phone Fax Email Address Booking Date Departure Date Arrival Date Address1 … Number of Passengers…

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 *