【问题标题】:Unable to import 'pandas_profiling' module无法导入“pandas_profiling”模块
【发布时间】:2021-06-11 11:40:37
【问题描述】:

我已经在基础环境中通过conda install -c conda-forge pandas-profiling 安装了“pandas_profiling”。我可以通过conda list 看到 pandas_profiling 已正确安装(附上快照),

当我尝试 import pandas_profiling 时,我收到 ModuleNotFoundError

import  pandas_profiling
Traceback (most recent call last):

  File "<ipython-input-4-60d2bac64bfc>", line 1, in <module>
    import  pandas_profiling

ModuleNotFoundError: No module named 'pandas_profiling'

更新:import sys; print(sys.path); print(sys.prefix) 的输出

['/home/user1/miniconda3/lib/python38.zip', '/home/user1/miniconda3/lib/python3.8', '/home/user1/miniconda3/lib/python3.8/lib-dynload', '', '/home/user1/miniconda3/lib/python3.8/site-packages', '/home/user1/miniconda3/lib/python3.8/site-packages/IPython/extensions', '/home/user1/.ipython']

/home/user1/miniconda3

【问题讨论】:

  • 如何验证运行在 IPython 中的内核是否与安装包的 Conda 环境相对应?例如,向我们展示import sys; print(sys.path); print(sys.prefix)的输出。
  • 我已经更新了我的问题,它是否与 Build of 'pandas-profiling = 0' 有关,如列表中所示。
  • 你可以尝试创建一个新环境,但强制更新版本吗?例如,conda create -n pp_test pandas-profiling=3 ipykernel.
  • 环境未创建Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source., PackagesNotFoundError: The following packages are not available from current channels: - pandas-profiling=3

标签: python conda pandas-profiling


【解决方案1】:

这是一个常见问题,请查看FAQ 中的此条目。

【讨论】:

    猜你喜欢
    • 2022-06-13
    • 2022-12-21
    • 2012-11-06
    • 2017-11-11
    • 2021-07-27
    • 2019-06-13
    • 2020-12-15
    • 2020-08-28
    相关资源
    最近更新 更多