Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
quibtisa
New Member

I keep getting the error message "ModuleNotFoundError"

I'm working on a Python project in which I scrape data from a website using the requests and BeautifulSoup modules. Yet, I continue to receive the problem message "ModuleNotFoundError: No module called 'bs4'". I attempted to install BeautifulSoup using pip, but it did not appear to work.

import requests
from bs4 import BeautifulSoup

url = 'https://www.example.com'
response = requests.get(url)
soup = BeautifulSoup(response.text, 'html.parser')

This is the error message:

ModuleNotFoundError: No module named 'bs4'

I attempted pip install beautifulsoup4 in the terminal, but when I try to execute the script, I get the same error message.

Yet, despite my efforts, the outcome is not what I had hoped for. I came across this article that uses the example, but I'm not sure I got it right. Could you please help me?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @quibtisa,

Did these packages host on the same path that you installed the python? If not, have you confirmed power bi and python has enough permissions to access these paths and files? (AFAIK, current it seems not support cloudy path)

How to Get Your Question Answered Quickly  

In addition, I'd like to suggest you check the following document about support python package in power bi if helps:

Learn which Python packages are supported - Power BI | Microsoft Learn

Regards,

Xiaoxin Sheng

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @quibtisa,

Did these packages host on the same path that you installed the python? If not, have you confirmed power bi and python has enough permissions to access these paths and files? (AFAIK, current it seems not support cloudy path)

How to Get Your Question Answered Quickly  

In addition, I'd like to suggest you check the following document about support python package in power bi if helps:

Learn which Python packages are supported - Power BI | Microsoft Learn

Regards,

Xiaoxin Sheng

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.