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

  • Crab Recommender System – Framework in Python Example and installation Problem Fix

      This is just to show that the import errors which were encountered during the installation of Crab, a Recommender Framework in Python  worked fine with the fixes I earlier outlined. These were the errors and how they were fixed: ImportError: No module named ‘scikits ImportError: No module named learn.base   The code below is the…

  • | |

    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…

  • |

    Quick Example and Walk-Through JSON with Python

    This is a quick to create a dictionary object , write it to a JSON file and then read back the file and convert it to a dictionary and access the items in the dictionary. Credit to : codebasics.  You can check him out on Youtube In [3]:

      In [6]:

      Out[6]:

    In [14]:…

  • | |

    Testing a Basic Linear Regression Model – Data Analysis and Intrepretation

    Testing a Basic Linear Regression Model Background 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.     1)     Program  Code and Output

           #####################     OUTPUT BEGIN  #####################     Axes(0.125,0.125;0.775×0.775) Describe the centered…

  • 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…

  • Basic Plotting Using Bokeh Python Pandas Library – Scatter, Line Visualizations

      Bokeh is a powerful framework for data visualization in Python. Here I take a look at straightforward plotting and visualization using this powerful library. Credit to PythonHow. You can check him out on Youtube bokeh.models #It is a low level interface which involves a lot of work bokeh.plotting # It is a middle level interface bokeh.chart #…

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 *