When using pandas_profiling: "ModuleNotFoundError: No module named 'visions.application'"
When using pandas_profiling: "ModuleNotFoundError: No module named 'visions.application'"
import numpy as np
import pandas as pd
from pandas_profiling import ProfileReport
在导入 pandas 配置文件时(请参阅上面的命令),我收到以下错误消息:-
---------------------------------------------------------------------------
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'
我已确定视觉模块版本为 0.7.4,因为 0.7.5 与 pandas-profiling 不兼容。
有人知道你是如何解决这个问题的吗?
'visions.application' 模块似乎在 v0.7.1
中可用
https://github.com/dylan-profiler/visions/tree/v0.7.1/src/visions
但在 v0.7.2 中不再可用
https://github.com/dylan-profiler/visions/tree/v0.7.2/src/visions
似乎 pandas_profiling 项目已更新,文件 summary.py 不再尝试执行此导入。
总结:使用visions v0.7.1版本或升级pandas_profiling。
import numpy as np
import pandas as pd
from pandas_profiling import ProfileReport
在导入 pandas 配置文件时(请参阅上面的命令),我收到以下错误消息:-
---------------------------------------------------------------------------
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'
我已确定视觉模块版本为 0.7.4,因为 0.7.5 与 pandas-profiling 不兼容。
有人知道你是如何解决这个问题的吗?
'visions.application' 模块似乎在 v0.7.1
中可用https://github.com/dylan-profiler/visions/tree/v0.7.1/src/visions
但在 v0.7.2 中不再可用
https://github.com/dylan-profiler/visions/tree/v0.7.2/src/visions
似乎 pandas_profiling 项目已更新,文件 summary.py 不再尝试执行此导入。
总结:使用visions v0.7.1版本或升级pandas_profiling。