2

Trying to install Selenium's python library on a windows 7 computer:

I got this:

------------------------------------------------------------
C:\Python27\Scripts\pip-script.py run on 03/31/11 11:44:21
Downloading/unpacking selenium
Exception:
Traceback (most recent call last):
  File "C:\Python27\lib\site-packages\pip-0.8.3-py2.7.egg\pip\basecommand.py", line 127, in main
    self.run(options, args)
  File "C:\Python27\lib\site-packages\pip-0.8.3-py2.7.egg\pip\commands\install.py", line 223, in run
    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
  File "C:\Python27\lib\site-packages\pip-0.8.3-py2.7.egg\pip\req.py", line 936, in prepare_files
    location = req_to_install.build_location(self.build_dir, not self.is_download)
  File "C:\Python27\lib\site-packages\pip-0.8.3-py2.7.egg\pip\req.py", line 147, in build_location
    _make_build_dir(build_dir)
  File "C:\Python27\lib\site-packages\pip-0.8.3-py2.7.egg\pip\req.py", line 1177, in _make_build_dir
    os.makedirs(build_dir)
  File "C:\Python27\lib\os.py", line 157, in makedirs
    mkdir(name, mode)
WindowsError: [Error 5] Access is denied: 'C:\\Windows\\System32\\build'
1
  • Maybe start cmd with administrative privileges? Commented Mar 31, 2011 at 15:54

2 Answers 2

4
WindowsError: [Error 5] Access is denied: 'C:\\Windows\\System32\\build'

Well, this line says that you don't have access to C:\Windows\System32\. That usually occurs you're not an administrator.

Try running pip from the administrator account:

  1. Press the Windows Logo Thing (technical name for it).
  2. Type in "cmd".
  3. Right-click "cmd.exe" and click "Run as administrator".
  4. Bear with UAC.
  5. Now try running pip.
Sign up to request clarification or add additional context in comments.

1 Comment

Best and only answer.
1

Install from a directory that you have access to:

pushd %USERPROFILE%
pip install selenium

Alternatively, you may get the pre-built package via PyPM.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.