

To install Python on your Mac, download the latest binary package from the official Python download page.Īfter installing Python, launch the terminal and type: pip install seleniumĪlternatively, you can launch pip using the -m flag while invoking Python: python -m pip install selenium

Or python -m pip install selenium On macOS Now, to install Selenium WebDriver, open your terminal and enter: pip install selenium All you need to do is download the official Python package using the default package manager of your distribution.

The -m flag stands for module name and allows you to pass a module at the time of invoking Python. If the above command throws an error, you can execute the pip command using the -m flag. Type in the following command to install Selenium: pip install selenium Then, install Selenium WebDriver using Pip, the official Python package manager.
