简体   繁体   English

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

[英]Updating selenium through 'sudo pip install -U selenium' fails

I'm trying to update selenium through the sell command: sudo pip install -U selenium 我正在尝试通过sell命令更新selenium: sudo pip install -U selenium

But I'm getting this output: 但是我得到了这个输出:

    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'

Someone who is familiar with this problem? 有人熟悉这个问题吗?

I don't now what the system is trying to tell me with this line: 我现在不知道系统试图告诉我这一行:

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'

I literally tried hundreds of things... 我真的尝试了数百件事......

Thanks a million in advance. 提前一百万谢谢。

Had the same problem. 有同样的问题。

This worked for me: go to https://pypi.python.org/pypi/selenium#downloads and download selenium-3.0.1.tar.gz. 这对我有用:转到https://pypi.python.org/pypi/selenium#downloads并下载selenium-3.0.1.tar.gz。

Then: 然后:

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM