请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

vscode 导入selenium 成功,但是运行报错:ModuleNotFoundError: No module named 'selenium'

正在回答 回答被采纳积分+3

1回答

Mushishi 2019-11-02 14:12:45

https://img1.sycdn.imooc.com//szimg/5dbd1e4c0978425702630057.jpg你这个没有安装啊。pip install selenium

0 回复 有任何疑惑可以回复我~
  • 提问者 尘子1 #1
    chengzidembp:muke chengzi$ pip install selenium
    Requirement already satisfied: selenium in /Users/chengzi/anaconda3/lib/python3.6/site-packages (3.141.0)
    Requirement already satisfied: urllib3 in /Users/chengzi/anaconda3/lib/python3.6/site-packages (from selenium) (1.22)
    chengzidembp:muke chengzi$ /usr/local/opt/python/bin/python3.7 /Users/chengzi/Desktop/muke/open_browser2.py
    Traceback (most recent call last):
      File "/Users/chengzi/Desktop/muke/open_browser2.py", line 2, in <module>
        from selenium import webdriver
    ModuleNotFoundError: No module named 'selenium'
    chengzidembp:muke chengzi$
    回复 有任何疑惑可以回复我~ 2019-11-02 14:24:12
  • 提问者 尘子1 #2
    已安装了,但还是报错
    回复 有任何疑惑可以回复我~ 2019-11-02 14:24:41
  • 提问者 尘子1 #3
    chengzidembp:muke chengzi$ /usr/local/opt/python/bin/python3.7 /Users/chengzi/Desktop/muke/open_browser2.py
    ['/Users/chengzi/Desktop/muke', '/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python37.zip', '/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7', '/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/lib-dynload', '/Users/chengzi/Library/Python/3.7/lib/python/site-packages', '/usr/local/lib/python3.7/site-packages']
    chengzidembp:muke chengzi$ /usr/local/opt/python/bin/python3.7 /Users/chengzi/Desktop/muke/open_browser2.py
    Traceback (most recent call last):
      File "/Users/chengzi/Desktop/muke/open_browser2.py", line 11, in <module>
        import selenium
    ModuleNotFoundError: No module named 'selenium'
    chengzidembp:muke chengzi$
    回复 有任何疑惑可以回复我~ 2019-11-02 14:51:59
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信