通过&sudo pip install -U selenium'更新selenium失败

时间:2016-04-06 13:43:19

标签: python macos selenium install pip

我试图通过sell命令更新selenium: sudo pip install -U selenium

但是我得到了这个输出:

    Exception:
Traceback (most recent call last):
  File "/Library/Python/2.7/site-packages/pip/basecommand.py", line 209, in main
    status = self.run(options, args)
  File "/Library/Python/2.7/site-packages/pip/commands/install.py", line 317, in run
    prefix=options.prefix_path,
  File "/Library/Python/2.7/site-packages/pip/req/req_set.py", line 732, in install
    **kwargs
  File "/Library/Python/2.7/site-packages/pip/req/req_install.py", line 835, in install
    self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
  File "/Library/Python/2.7/site-packages/pip/req/req_install.py", line 1030, in move_wheel_files
    isolated=self.isolated,
  File "/Library/Python/2.7/site-packages/pip/wheel.py", line 376, in move_wheel_files
    clobber(source, dest, False, fixer=fixer, filter=filter)
  File "/Library/Python/2.7/site-packages/pip/wheel.py", line 315, in clobber
    ensure_dir(destdir)
  File "/Library/Python/2.7/site-packages/pip/utils/__init__.py", line 83, in ensure_dir
    os.makedirs(path)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 150, in makedirs
    makedirs(head, mode)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 150, in makedirs
    makedirs(head, mode)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 150, in makedirs
    makedirs(head, mode)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 157, in makedirs
    mkdir(name, mode)
OSError: [Errno 1] Operation not permitted: '/System/Library/Frameworks/Python.framework/Versions/2.7/selenium'

有谁熟悉这个问题?

我现在不知道系统试图通过这条线告诉我:

  

OSError:[Errno 1]不允许操作:   ' /System/Library/Frameworks/Python.framework/Versions/2.7/selenium'

我真的尝试了数百件事......

提前感谢一百万。

1 个答案:

答案 0 :(得分:0)

有同样的问题。

这对我有用:转到https://pypi.python.org/pypi/selenium#downloads并下载selenium-3.0.1.tar.gz。

然后:

tar zxvf selenium-3.0.1.tar.gz
cd selenium-3.0.1
sudo python setup.py install