Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no module named "pydantic.v1" #1532

Open
3 tasks done
khangnvt opened this issue Jan 31, 2024 · 1 comment
Open
3 tasks done

no module named "pydantic.v1" #1532

khangnvt opened this issue Jan 31, 2024 · 1 comment

Comments

@khangnvt
Copy link

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

import numpy as np
import pandas as pd
from ydata_profiling import ProfileReport

df = pd.DataFrame(np.random.rand(100, 5), columns=["a", "b", "c", "d", "e"])

pandas-profiling version

0.7.5

Dependencies

pandas == 2.0.3
numpy == 1.24.3

OS

Windows 10

Checklist

  • There is not yet another bug report for this issue in the issue tracker
  • The problem is reproducible from this bug report. This guide can help to craft a minimal bug report.
  • The issue has not been resolved by the entries listed under Common Issues.
@dkinga
Copy link

dkinga commented Mar 11, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants