Python导入selenium模块报错

我们安装好python,selenium,pycharm
python -m pip install --upgrade pip
或者:pip install selenium
编写初步代码:

Python导入selenium模块报错
发现webdriver下方出现红色波浪线,不能正常导入

解决办法:
Python导入selenium模块报错

file ----> setting ----> project: ----> Project Interprester 这个会话中,可以设置python的版本,

看见下方的pip,双击pip

搜索框中输入selenium 然后点击左下方install 即可