Installed selenium using pip : pip install selenium<br>
pip version : pip 8.1.2 from /usr/local/lib/python2.7/site-packages (python 2.7)<br>
python version : Python 2.7.5我没有早点收到这个错误。
"ImportError: No module named selenium"一段时间前升级了pip并开始收到此错误。从之前的问题中找不到任何有用的东西。
sys.path:
'','/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip','/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7','/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin','/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac','/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages','/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python','/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk','/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old','/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload','/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC',‘/库/Python/2.7/站点包’
有人能帮帮忙吗?
发布于 2016-07-18 14:12:53
请检查您的机器中是否有多个python解释器。
在终端中检查python的默认解释器,然后按ENTER键。
如果它与安装时提到的y PIP版本相同,应该不会有任何问题。
否则,
通过在bash文件中保留别名来更改默认解释器,
根据您的解释器版本,将下面的行追加为最后一行
alias python='/usr/bin/python2.7.6'https://stackoverflow.com/questions/38428735
复制相似问题