Ramesh Ganesan
Ramesh Ganesan

Reputation: 71

getting below error while doing pip install in windows 7 python 2.7

Any help would be appreciated, I'm getting the error below while installing the any python package using pip install. pip install installed from get-pip.py.

Exception:
Traceback (most recent call last):
  File "c:\python27\lib\site-packages\pip\basecommand.py", line 215, in main 
    status = self.run(options, args)
  File "c:\python27\lib\site-packages\pip\commands\install.py", line 310, in run
    wb.build(autobuilding=True)
  File "c:\python27\lib\site-packages\pip\wheel.py", line 750, in build
    self.requirement_set.prepare_files(self.finder)
  File "c:\python27\lib\site-packages\pip\req\req_set.py", line 370, in prepare_files
    ignore_dependencies=self.ignore_dependencies))
  File "c:\python27\lib\site-packages\pip\req\req_set.py", line 587, in _prepare_file
    session=self.session, hashes=hashes)
  File "c:\python27\lib\site-packages\pip\download.py", line 810, in unpack_url
    hashes=hashes
  File "c:\python27\lib\site-packages\pip\download.py", line 661, in unpack_http_url
    rmtree(temp_dir)
  File "c:\python27\lib\site-packages\pip\_vendor\retrying.py", line 49, in wrapped_f
    return Retrying(*dargs, **dkw).call(f, *args, **kw)
  File "c:\python27\lib\site-packages\pip\_vendor\retrying.py", line 212, in call
    raise attempt.get()
  File "c:\python27\lib\site-packages\pip\_vendor\retrying.py", line 247, in get
    six.reraise(self.value[0], self.value[1], self.value[2])
  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 249, 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\\ganesr01\\appdata\\local\\
temp\\pip-nhsft2-unpack\\pypiwin32-219-cp27-none-win32.whl'

Upvotes: 1

Views: 1002

Answers (1)

Ali
Ali

Reputation: 663

Re-run the command except open up command prompt as admin

Edit: If that doesn't work it looks like you do not have permissions to write to that folder You need to change the permissions on those folders.

Upvotes: 1

Related Questions