【发布时间】: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