ImportError: cannot import name webdriver问题解决
安装完selenium之后,发现根本无法使用,一运行代码,就报ImportError: cannot import name webdriver错误
于是各种FQ查找解决方法,查到方法如下:
在当前目录有个明教selenium的文件,Python会先导入这个文件,然后再导入标准库里面的selenium.py可以使用import selenium print selenium.__file__去看打印出的文件路径,如果不是下面类似的C:\Python27\lib\site-packages\selenium-2.31.0-py2.7.egg\selenium\__init__.pyc,需要把当前目录下的文件删除或者重命名。
网上最多就是这种方法,但是毫无作用,后来无意中解决了
重启电脑->_->,坑爹。
ImportError: cannot import name webdriver问题解决的更多相关文章
- ImportError: cannot import name webdriver
遇到问题: 学习selenium过程中为了方便自己知道学习的脚本的存放路径,以selenium命名 起初.py文件都在selenium文件夹下面,使用 from selenium import web ...
- ImportError: cannot import name webdriver解决方案
在sublime写一个Python程序的时候,使用from selenium import webdriver,在run的时候却出现ImportError: cannot import nam ...
- 解决ImportError: cannot import name 'webdriver' from 'selenium' (C:\Users\Mr.Su\PycharmProjects\***\venv\selenium.py)
报错信息如下图所示: 解决方案:将项目根目录下的自己创建的selenium.py文件重命名.
- ubuntu 下更新pip后发生 ImportError: cannot import name 'main'的问题解决
今天刚使用ubuntu 由于安装的是pip 8的版本,我感觉pip版本有些低就随手将将pip更新了,刚新到pip 10版本的,没想到刚更新完就报错了, 发生 ImportError: cannot i ...
- django项目 报错:ImportError: cannot import name choice
今天项目开发中遇到一个错误,排查了很久才发现原因,现在分享出来,希望对大家有所帮助. 错误描述:在项目中添加了一个random.py的类,导入random中的choice,并在randstr方法中使用 ...
- Windows下Python安装: requires numpy+mkl 和ImportError: cannot import name NUMPY_MKL
最近写了一篇关于“微软开源分布式高性能GB框架LightGBM安装使用”的文章,有小伙伴安装Python环境遇到了问题.我个人也尝试安装了一下,确实遇到了很多问题."Windows7下pyt ...
- ubuntu 终端无法启动:ImportError: cannot import name 'sysconfig' from 'distutils'
gnome-terminal 出错 ImportError: cannot import name '_gi' 系统:ubuntu17 装了python2.7.13, 之后陆续装了python3.5. ...
- ubuntu16 升级pip3后报错File "/usr/bin/pip3", line 9, in <module> from pip import main ImportError: cannot import name 'main'
问题:ubuntu16 执行pip3 install --upgrade pip之后,pip3执行出错. Traceback (most recent call last): File "/ ...
- 升级pip3后出现importerror:cannot import name main
在ubuntu中,升级了pip3,再次使用pip3安装相关的python包的时候就出现以下错误 ImportError: cannot import name main 解决:pip3文件在/usr/ ...
随机推荐
- 解决jQuery中dbclick事件触发两次click事件
首先感谢这位小哥!http://qubernet.blog.163.com/blog/static/1779472842011101505853216/ 太长姿势了. 在jQuery事件绑定中,dbc ...
- js中的this指向
1, 指向window 全局变量 alert(this) //返回 [object Window] 全局函数 function sayHello(){ alert(this); } sayHello( ...
- zabbix之3触发器/action及模板
1.触发器: {server_name:item_name.func.operator.condition} 一旦condition(条件)触发,则item状态改变 触发器之间可以存在依赖关系,即it ...
- tuple只有一个元素的时候,必须要加逗号
In [1]: a = (1) In [2]: a Out[2]: 1 In [3]: a = (1,) In [4]: a Out[4]: (1,) 这是因为括号()既可以表示tuple,又可以表示 ...
- Leetcode 104 Maximum Depth of Binary Tree python
题目: Given a binary tree, find its maximum depth. The maximum depth is the number of nodes along the ...
- C++----练习--整型赋值时的溢出
1.如果所赋的值超出了类型的取值范围.那么只保留最低位 #include<iostream> int main() { ; //unsigned char c = 256; 有无符号都是一 ...
- LinqToSql增加、修改、删除---(转载)
LinqToSql ,EF:外键实体的CRD 2011-03-06 21:56:26| 分类: linq | 标签:编程 |字号 订阅 接触LinqTosql是很久的事情了, ...
- webService设置超时时间
在客户端配置文件中设置: <bindings> <basicHttpBinding> <binding name="UrlCrawler ...
- SQL Server 索引的图形界面操作 <第十二篇>
一.索引的图形界面操作 SQL Server非常强大的就是图形界面操作.关于索引方面也一样那么强大,很多操作比如说重建索引啊,查看各种统计信息啊,都能够通过图形界面快速查看和操作,下面来看看SQL S ...
- 关于#ifndef,#define,#end的说明
#ifndef,#define,#end 是宏定义的一种---条件编译 这样我直接举个例子好了:我定义两个相同的类A分别在single.h和singlenew.h single.h: #include ...