import numpy as np
import pandas as pd
from pandas_profiling import ProfileReport
Whilst importing pandas profile (please see above command), I am getting the following error message:-
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
~\AppData\Local\Temp/ipykernel_3396/1468051405.py in <module>
1 import numpy as np
2 import pandas as pd
----> 3 from pandas_profiling import ProfileReport
~\Anaconda3\lib\site-packages\pandas_profiling\__init__.py in <module>
5
6 from pandas_profiling.config import Config, config
----> 7 from pandas_profiling.controller import pandas_decorator
8 from pandas_profiling.profile_report import ProfileReport
9 from pandas_profiling.version import __version__
~\Anaconda3\lib\site-packages\pandas_profiling\controller\pandas_decorator.py in <module>
2 from pandas import DataFrame
3
----> 4 from pandas_profiling.__init__ import ProfileReport
5
6
~\Anaconda3\lib\site-packages\pandas_profiling\__init__.py in <module>
6 from pandas_profiling.config import Config, config
7 from pandas_profiling.controller import pandas_decorator
----> 8 from pandas_profiling.profile_report import ProfileReport
9 from pandas_profiling.version import __version__
10
~\Anaconda3\lib\site-packages\pandas_profiling\profile_report.py in <module>
9
10 from pandas_profiling.config import config
---> 11 from pandas_profiling.model.describe import describe as describe_df
12 from pandas_profiling.model.messages import MessageType
13 from pandas_profiling.report import get_report_structure
~\Anaconda3\lib\site-packages\pandas_profiling\model\describe.py in <module>
9 from pandas_profiling.model.base import Variable
10 from pandas_profiling.model.correlations import calculate_correlation
---> 11 from pandas_profiling.model.summary import (
12 get_duplicates,
13 get_messages,
~\Anaconda3\lib\site-packages\pandas_profiling\model\summary.py in <module>
11 import pandas as pd
12 from scipy.stats.stats import chisquare
---> 13 from visions.application.summaries.series import (
14 file_summary,
15 image_summary,
ModuleNotFoundError: No module named 'visions.application'
I have made sure that the vision module version is 0.7.4 as 0.7.5 is not compatible with pandas-profiling.
Does anyone have an idea about how you resolve this issue?
CodePudding user response:
It appears that the 'visions.application' module was available in v0.7.1
https://github.com/dylan-profiler/visions/tree/v0.7.1/src/visions
But it's no longer available in v0.7.2
https://github.com/dylan-profiler/visions/tree/v0.7.2/src/visions
It also appears that the pandas_profiling project has been updated, the file summary.py no longer tries to do this import.
In summary: use visions version v0.7.1 or upgrade pandas_profiling.