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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. 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
v-shex-msft
Community Support
Community Support

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

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

1 REPLY 1
v-shex-msft
Community Support
Community Support

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

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

Check out the February 2024 Power BI update to learn about new features.

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.