I am doing the streamlit 30 days challenge course.
When importing pandas_profiling I get an error that is not solved by updating pandas and pandas_profiling.
Steps to reproduce
Code snippet:
import pandas as pd
import numpy as np
import streamlit as st
import altair as alt
from datetime import time, datetime
from vega_datasets import data as vega_data
import pandas_profiling
If applicable, please provide the steps we should take to reproduce the error or specified behavior.
simple import
Explain what you expect to happen when you run the code above.
ImportError: cannot import name âto_htmlâ from âpandas_profiling.reportâ (C:\Users\Hans\anaconda3\envs\streamlit-env\lib\site-packages\pandas_profiling\report_init_.py)
Explain the undesired behavior or error you see when you run the code above.
If youâre seeing an error message, share the full contents of the error message here.
Debug info
Streamlit version: (get it with $ streamlit version)
Python version: (get it with $ python --version)
Using Conda? PipEnv? PyEnv? Pex?
OS version:
Browser version:
Requirements file
Using Conda? PipEnv? PyEnv? Pex? Share the contents of your requirements file here.
Not sure what a requirements file is? Check out this doc and add a requirements file to your app.
Links
Link to your GitHub repo:
Link to your deployed app:
Additional information
If needed, add any other context about the problem here.
So I think I solved the issue for myself. Apparently, I read on Pypi that the package pandas-profiling is changed to the name and update: âdata-profilingââŠAfter installing this package and then importing ydata_profiling in the script instead of pandas-profiling all works fine, and no more errors.
The Streamlit devs might want to update this for their 30-day course challenge on day 14:streamlit components ==> pandas-profiling is now ydata-profiling
No, same error message. At first, I thought it might be my fault because I did not
pip install streamlit_pandas_profiling
via the terminal but though my IDE, Thonny, using their package manager.
So I âstopped/deactivated/cdâd back to mainâ and installed via the terminal, no change, same error message.
Next I tried
pip install pydantic-settings
both through the package manager and terminal, no change.
Next I exited everything, turned off my laptop, turned back on, used BleachBit to clean, tried again, no change, same message.
One last thing I tried - there was a message in the terminal to upgrade pypi (?) so upgraded and tested again, no change, same message.
Thanks for stopping by! We use cookies to help us understand how you interact with our website.
By clicking âAccept allâ, you consent to our use of cookies. For more information, please see our privacy policy.
Cookie settings
Strictly necessary cookies
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
Performance cookies
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
Functional cookies
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
Targeting cookies
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.