我正在尝试在我的MacBook上导入Selenium但是当我尝试运行我的python文件时出现错误。
Traceback (most recent call last):
File "excelsior_jig.py", line 1, in <module>
from selenium import webdriver
ImportError: No module named selenium
所以我尝试重新安装selenium,但它告诉我需求已经是最新的:/usr/local/lib/python2.7/site-packages中的selenium。
我错过了什么,我不明白为什么它不会导入。
我的代码当前是这样的:
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
first_name = "Jake"
last_name = "Mills"
date_of_birth = "11/01/1997"
email_n = 1
email = "jakelmills+", email_n, "@gmail.com"
print email