Open khangnvt opened 9 months ago
I've encountered same issue. It looks like you need to install pydantic >= 2 It worked for me with moving from 1.8.2 to 2.6.0
pip install pydantic==2.6.0
what is version about pandas-profiling ? I've installed pydantic=2.6.0 but nothing
Current Behaviour
---------------------------------------------------------------------------ModuleNotFoundError Traceback (most recent call last) Cell In[7], line 3 1 import numpy as np 2 import pandas as pd----> 3 from ydata_profiling import ProfileReport 5 df = pd.DataFrame(np.random.rand(100, 5), columns=["a", "b", "c", "d", "e"])
File ~\AppData\Roaming\Python\Python311\site-packages\ydata_profiling__init__.py:14 10 warnings.simplefilter("ignore", category=NumbaDeprecationWarning) 12 import importlib.util # isort:skip # noqa---> 14 from ydata_profiling.compare_reports import compare # isort:skip # noqa 15 from ydata_profiling.controller import pandas_decorator # isort:skip # noqa 16 from ydata_profiling.profile_report import ProfileReport # isort:skip # noqa File ~\AppData\Roaming\Python\Python311\site-packages\ydata_profiling\compare_reports.py:9 6 import pandas as pd 7 from dacite import from_dict----> 9 from ydata_profiling.config import Correlation, Settings 10 from ydata_profiling.model import BaseDescription 11 from ydata_profiling.model.alerts import Alert
File ~\AppData\Roaming\Python\Python311\site-packages\ydata_profiling\config.py:7 4 from typing import Any, Dict, List, Optional, Tuple, Union 6 import yaml----> 7 from pydantic.v1 import BaseModel, BaseSettings, Field, PrivateAttr 10 def _merge_dictionaries(dict1: dict, dict2: dict) -> dict: 11 """ 12 Recursive merge dictionaries. 13 (...) 16 :return: Merged dictionary 17 """
ModuleNotFoundError: No module named 'pydantic.v1'
Expected Behaviour
Successfully import
Data Description
df = pd.DataFrame(np.random.rand(100, 5), columns=["a", "b", "c", "d", "e"])
Code that reproduces the bug
pandas-profiling version
0.7.5
Dependencies
OS
Windows 10
Checklist