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…

  • 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]:

     

  • | | | | |

    Java Python R SQL Excel Compared Similarities For Data Science and Data Analytics – The Basics

    If you have ever worked with Java, Python, R, SQL, Excel and other Languages on a varied Data Science or Data Analytics projects, you will realise that all these languages have similar syntaxes, or at least, can achieve the same objective with very similar codes.   Below is a comparison and similarities of these various tools…

  • Matplotlib Pyplot Plt Python Pandas Data Visualization Plotting

      This is some quick notes about graphing or plotting graphs with Matplotlib in Python. Credits to sentdex.  You can check him out on Youtube.

      In [4]:

      In [10]:

      In [14]:

      In [20]:

      In [23]:

      In [30]:

      Out[30]:

    In [48]:

        Want more information like this? Email People…

  • | |

    Run Your Python and R Codes Online For Your Data Science and Machine Learning Projects Mini Projects For Free

    Sometimes, you would want to easily access and run your Python and R codes wherever you find yourself in the world once you have internet access. This is really handy when you have a mini-project you are working on , or you are going through an online tutorial, or you are trying to teach or…

  • |

    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…

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 *