在sublime写一个Python程序的时候,使用from selenium import webdriver,在run的时候却出现ImportError: cannot import name webdriver的提示,但是在Python IDLE里面跑却没有错误。

   查了很多资料,原因如下,我新建的名称叫selenium.py,导致Python会先导入这个文件,然后再导入标准库里面的selenium.py。

把当前目录下的文件删除或者重命名之后再run正常。

ImportError: cannot import name webdriver解决方案的更多相关文章

  1. ImportError: cannot import name webdriver问题解决

    安装完selenium之后,发现根本无法使用,一运行代码,就报ImportError: cannot import name webdriver错误 于是各种FQ查找解决方法,查到方法如下: 在当前目 ...

  2. ImportError: cannot import name webdriver

    遇到问题: 学习selenium过程中为了方便自己知道学习的脚本的存放路径,以selenium命名 起初.py文件都在selenium文件夹下面,使用 from selenium import web ...

  3. 解决ImportError: cannot import name 'webdriver' from 'selenium' (C:\Users\Mr.Su\PycharmProjects\***\venv\selenium.py)

    报错信息如下图所示: 解决方案:将项目根目录下的自己创建的selenium.py文件重命名.

  4. pip3更新后install package出现ImportError: cannot import name 'main'

    linux下pip3更新后,install包出现main不能导入的情况: bear@bear:~/eclipse-workspace/Python-toolbox$ pip3 install pycr ...

  5. 解决 ImportError: cannot import name pywrap_tensorflow

    原文:https://aichamp.wordpress.com/2016/11/13/handeling-importerror-cannot-import-name-pywrap_tensorfl ...

  6. ImportError: cannot import name gof

    今天打开spyder说调试一个theano程序,但是import theano提示 ImportError: cannot import name gof 最后解决方案 pip install --u ...

  7. ImportError : cannot import name main

    当我们有时候安装不成功插件或者其他模块时候,会有pip报错hu@hu-VirtualBox:~/下载/MySQL-python-1.2.4b4$ pip install pymysqlTracebac ...

  8. pip install ImportError: cannot import name main

    在Ubuntu上用pip install装ansible时报错 root@user:~# pip install --no-cache-dir ansible -i http://mirrors.al ...

  9. 输入pip命令报错:from pip import main ImportError: cannot import name 'main'

    报错信息: qly@qlyComputer:~$ pip Traceback (most recent call last): File "/usr/bin/pip", line ...

随机推荐

  1. leetcode-159周赛-5230-缀点成线

    自己的提交: class Solution: def checkStraightLine(self, coordinates: List[List[int]]) -> bool: if not ...

  2. 0928CSP-S模拟测试赛后总结

    依旧跌落.昨天只是偶然诈尸.我依旧是那个第二机房垫底大垃圾. 赛时打的很放松.因为T1想到了正解.对拍也打了.尽管用了大约一半的考试时间. 但是对拍拍了很久没有出错.如果你在2019年9月28日晚一下 ...

  3. NX二次开发-UFUN圆弧矩阵标记、起始角和结束角(弧度测量)、圆弧中心坐标和圆弧半径UF_CURVE_ask_arc_data(边可以用)

    1 NX11+VS2013 2 3 #include <uf.h> 4 #include <uf_ui.h> 5 #include <uf_modl.h> 6 #i ...

  4. Spring-Security (学习记录七)--实现FilterInvocationSecurityMetadataSource的类将无法切入声明式事物

    目录 1 查看继承关系 2 说明 3 查看源码: 实现了FilterInvocationSecurityMetadataSource 的类将无法切入声明式事物. 原因: 1 查看继承关系 先查看Fil ...

  5. OAuth2.0的理解-转自阮一峰博客

    一.应用场景 为了理解OAuth的适用场合,让我举一个假设的例子. 有一个"云冲印"的网站,可以将用户储存在Google的照片,冲印出来.用户为了使用该服务,必须让"云冲 ...

  6. CVE-2019-0708简单复现

    各文件对应位置 rdp.rb -> /usr/share/metasploit-framework/lib/msf/core/exploit/rdp.rb rdp_scanner.rb -> ...

  7. scanf 与getchar区别

    #include<stdio.h> void main() {    int c; c=getchar(); //scanf("%c",&c); if(c!=' ...

  8. Ubuntu安裝nginx-1.6.2

    1.在執行完./configure 和make install 後出現 test -d '/usr/local/nginx/logs'         || mkdir -p '/usr/local/ ...

  9. 关于合并pdf文件出现的问题

    输出端出现以下问题: PdfReadWarning: Xref table not zero-indexed. ID numbers for objects will be 解决方案: import ...

  10. ATC/TC/CF

    10.25 去打 CF,然后被 CF 打了. CF EDU 75 A. Broken Keyboard 精神恍惚,WA 了一发. B. Binary Palindromes 比赛中的憨憨做法,考虑一个 ...