zoukankan      html  css  js  c++  java
  • python pip安装selenium时报错, ..has requirement websocket-client==0.48.0, but you'll have websocket -client 0.57.0 which is incoopatibale.

    默认打开cmd,无法执行pip install selenium,报错:‘pip‘ 不是内部或外部命令,也不是可运行的程序或批处理文件。

    所以cd到python script的根目录,cd C:UsersAdministratorAppDataLocalProgramsPythonPython37-32Scripts

    然后在运行pip install selenium

    报错:waston-developer-cloud 2.6.0 has requirement websocket-client==0.48.0, but you'll have websocket -client 0.57.0 which is incoopatibale.

     只能手动安装了。

    参考这篇博客:https://www.cnblogs.com/xiaxiaoxu/p/8909622.html

    chromedriver的安装这里略。

    然后,python测试一下chromedriver的安装。

    import time
    from selenium import webdriver
    
    driver = webdriver.Chrome('C:/Program Files (x86)/Google/Chrome/Application/chromedriver') # Optional argument, if not specified will search path.
    driver.get('http://www.google.com/');
    time.sleep(5) # Let the user actually see something!
    
    driver.maximize_window()
    search_box = driver.find_element_by_name('q')
    search_box.send_keys('ChromeDriver')
    search_box.submit()
    time.sleep(5) # Let the user actually see something!
    driver.quit()
    

      测试成功。

    ref:https://sites.google.com/a/chromium.org/chromedriver/getting-started

  • 相关阅读:
    用栈消除递归调用,实现DFS【伪代码】
    B树残缺版
    lvm
    RAID独立冗余磁盘阵列
    压缩、归档
    磁盘、文件系统
    setfacl、getfacl
    locate,find
    vim编辑器
    sed流编辑器
  • 原文地址:https://www.cnblogs.com/watermarks/p/14774543.html
Copyright © 2011-2022 走看看