I've been asked to help a friend with a script health.py which uses python 2 and selenium.
I've been using python 3 and have selenium downloaded and working with 3.
When I try run the script with python 2 I get:from selenium import webdriverImportError: No module named selenium
If I try install:
pip install seleniumThen it says:
Requirement already satisfied: selenium in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (3.141.0)Requirement already satisfied: urllib3 in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from selenium) (1.25.11)I notice that those paths both point to python3.6 so how do I install selenium in my python 2.7 location?
Sadly I've always been a bit confused with how these python paths specifically work so have probably just made a mess in previous acts. If it helps here is this:
which python2.7/usr/bin/python2.7I also tried reisntalling python2 with brew
brew install python@2hoping this would reset my settings and allow another pip install of selenium to put things in the correct place, but nothing seemed to change.
Thanks for any help!
edit - extra info: I've noticed that my python3 is inside /Library while my python 2 is inside /System. Could this be a source of my issues?
/Library/Frameworks/Python.framework/Versions/3.6/System/Library/Frameworks/Python.framework/Versions/2.7



