First Install Python based on the Operating System you are using.
Then Install it with the following command:
pip install -U selenium
then use this in your code:
from selenium import webdriver
You can also use many of the following as required
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import Select
from selenium.common.exceptions import NoSuchElementException