I've tried the File>Settings>project>python interperter route as well as right clicking and install package from the context menu but both result in the error below:
Usage:
/home/pi/git/scrappyApp/venv/bin/python -m pip install [options] <requirement specifier> [package-index-options] ...
/home/pi/git/scrappyApp/venv/bin/python -m pip install [options] -r <requirements file> [package-index-options] ...
/home/pi/git/scrappyApp/venv/bin/python -m pip install [options] [-e] <vcs project url> ...
/home/pi/git/scrappyApp/venv/bin/python -m pip install [options] [-e] <local project path> ...
/home/pi/git/scrappyApp/venv/bin/python -m pip install [options] <archive url/path> ...
no such option: --build-dir
using python 3.7 in a virtualenv ~/git/scrappyApp/venv/bin/python
UPDATE oddly enough running pip3 install selenium directly from a command prompt worked.