ImportError: cannot import name webdriver
遇到问题:
学习selenium过程中为了方便自己知道学习的脚本的存放路径,以selenium命名
起初.py文件都在selenium文件夹下面,使用 from selenium import webdriver 引用 webdriver是没有问题
后台在 selenium下创建了文件夹来人类不同的学习内容,之后出现了 ImportError: cannot import name webdriver 错误, 但是在Python IDLE里面跑却没有错误
网上查了资料,https://www.cnblogs.com/bluescorpio/archive/2013/03/20/2971435.html 博主:小楼,使用该方法未解决问题
原因:
学习过程中用的存文件的selelnium文件夹 与 开发环境的selenium(C:\Python27\selenium)同名。
python在导包的过程中会优先导当前工作目录,也就是学习的selenium工作目录,工作目录没有文件夹是没有问题,有文件夹就会有问题(这个问题我也不知道为什么)
解决办法:
修改当前工作目录,避免写环境 selenium 目录同名
ImportError: cannot import name webdriver的更多相关文章
- ImportError: cannot import name webdriver问题解决
安装完selenium之后,发现根本无法使用,一运行代码,就报ImportError: cannot import name webdriver错误 于是各种FQ查找解决方法,查到方法如下: 在当前目 ...
- 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文件重命名.
- ImportError: cannot import name 'check_arrays'
from sklearn.utils.validation import check_arrays 执行 from sklearn.utils.validation import check_arra ...
- python import eventlet包时提示ImportError: cannot import name eventlet
root@zte-desktop:/home/ubuntu/python-threads# cat eventlet.py #!/usr/bin python import eventlet from ...
- ImportError: cannot import name 'NUMPY_MKL'
>>> import scipy Traceback (most recent call last): File "<stdin>", line 1, ...
- 解决ImportError: cannot import name HTTPConnection的方法
在写python程序的时候,使用from httplib import HTTPConnection,在run的时候提示ImportError: cannot import name HTTPConn ...
- Ubuntu|ython3 :ImportError: cannot import name 'main'
1.问题 root@stephen-K55VD:/usr/bin# pip3 Traceback (most recent call last): File "/usr/bin/pip3&q ...
- ImportError: cannot import name UnrewindableBodyError
错误信息: File "/usr/lib/python2.7/site-packages/urllib3/util/__init__.py", line 4, in <mod ...
随机推荐
- unity描边效果
这里总结了几种在unity实现描边效果的方法,首先准备一个模型导入在unity中,使用默认shader,上传一张原始图,以便后面实现功能效果的对比 一.边缘光,这里参照官方的一个SurfaceShad ...
- BDA大数据处理流程
可以看出,数据处理用云,可以高效完成.而分析部分应该利用传统的bi工具.
- MySQL 5.6初始配置调优
原文链接: What to tune in MySQL 5.6 after installation原文日期: 2013年09月17日翻译日期: 2014年06月01日翻译人员: 铁锚 随着 大量默认 ...
- ORACLE ERP各模块会计分录
ORACLE ERP各模块会计分录 第一章 采购模块 一.资产采购(科目来源:库存组织) 1.物料接收 借 材料采购 接收数量*采购单价 贷 应计暂估 接收数量*采购单价 2 ...
- Zeromq自连接错误
Zeromq自连接错误(金庆的专栏)Zeromq消息中间件开发的服务器和客户端不必按顺序启动,客户端可以在服务器开启之前启动.这是Zmq特别好用的一大特性.利用该特性,网游各功能服务器可以任意重启,实 ...
- LeetCode(47)-Reverse Bits
题目: Reverse bits of a given 32 bits unsigned integer. For example, given input 43261596 (represented ...
- LeetCode(37)-Minimum Depth of Binary Tree
题目: Given a binary tree, find its minimum depth. The minimum depth is the number of nodes along the ...
- 熊猫猪新系统测试之二:Mac OS X 10.10 优胜美地
在第一篇windows 10技术预览版测试之后,本猫为大家呈现另一个刚刚才更新的mac操作系统:"优胜美地".苹果同样一改以猫科动物为代号命名的传统,在10.9的Mavericks ...
- Spring Aop 梳理
Aspect Oriented Programming 面向切面编程.解耦是程序员编码开发过程中一直追求的.AOP也是为了解耦所诞生. 具体思想是:定义一个切面,在切面的纵向定义处理方法,处理完成之 ...
- 窗口函数解决数据岛问题(mysql暂无窗口函数,可以通过用户变量解决窗口函数问题)
数据岛问题: 有表: create table dataisland (id int) insert into dataisland values(1),(2),(3),(7),(11),(12) ...