How to install selenium for Jupyter Notebook?

Viewed 2388

I have run the command pip install selenium, and it can execute from selenium import webdriver in terminal, but it cannot execute this line in Jupyter Notebook, which shows "ModuleNotFoundError: No module named 'selenium'". Besides, I also copied chromedriver.exec file into the path of my jupyter. Does anyone konw how to solve it?

enter image description here enter image description here

1 Answers

If you are using the Anaconda navigator to run Jupyter then you need to run the pip install selenium command within the Anaconda prompt.

I believe that your Python environment in Jupyter differs from the Python environment that may be in your PATH.

Related