我在Python3.5.2的最新PyCharm (PyCharm 2016.2.3)上遇到了无数的问题。有一半的时间软件包是不可下载的,但让我们继续关注手头的问题。我尝试在Selenium中运行以下代码:
from selenium import webdriver
from selenium.webdriver.common.keys import Keys只会收到一条ImportError消息'ImportError: cannot import name "keys"‘。任何帮助都将不胜感激。
发布于 2017-04-04 16:36:20
尝试使用PIP重新安装selenium,并在pycharm中进行配置。
按照以下步骤使用PIP重新安装/升级selenium。
在环境变量中设置path:\Python35\Scripts。
打开cmd。输入pip install --upgrade selenium。
在pycharm中,确保选择了正确的python解释器。您可以在Run-> Edit configuration中进行检查:选择正确的python解释器。
https://stackoverflow.com/questions/39749976
复制相似问题