Home > OS >  Jupyter Notebook error-ModuleNotFoundError: No module named 'selenium'
Jupyter Notebook error-ModuleNotFoundError: No module named 'selenium'

Time:09-12

This is the error message I am getting after running the code in Jupyter Notebook.

If I write pip install selenium its is saying pip not found

ModuleNotFoundError                       Traceback (most recent call last)
Input In [7], in <cell line: 1>()
----> 1 from selenium import webdriver
      2 from BeautifulSoup import BeautifulSoup
      3 import pandas as pd
ModuleNotFoundError: No module named 'selenium'

CodePudding user response:

Try to install selenium or any package using pip command on Jupyter notebook putting ! before pip as follows:

!pip install selenium

CodePudding user response:

If pip isn't found, it could be pip3.

Note that you have to run pip in a terminal, not in Jupyter.

If that doesn't work, you may need to install pip: try the Windows or Mac installer, and select pip, or on Ubuntu:

sudo apt install python3-pip
  • Related