ModuleNotFoundError: 找不到模块名 ‘skbio.stats.diversity’

huangapple go评论65阅读模式
英文:

ModuleNotFoundError: No module named 'skbio.stats.diversity'

问题

我正在尝试从Python的skbio.stats.diversity模块中导入beta_diversity函数:

from skbio.stats.diversity import beta_diversity

但我遇到了一个ModuleNotFoundError,错误消息为No module named 'skbio.stats.diversity'

我已经使用pip安装了scikit-bio包。我已经检查了我的Python环境并确认了该包已安装。但似乎scikit-bio中的特定模块无法访问。

我尝试重新安装包并更新到最新版本,但错误仍然存在。

为什么会出现这个错误,我该如何解决它?

英文:

I am trying to import the beta_diversity function from the skbio.stats.diversity module in Python:

from skbio.stats.diversity import beta_diversity

but I am encountering a ModuleNotFoundError with the message No module named 'skbio.stats.diversity'.

I have already installed the scikit-bio package using pip. I have checked my Python environment and confirmed that the package is installed. However, it seems that the specific module within scikit-bio is not accessible.

I have tried reinstalling the package and updating it to the latest version, but the error still persists.

Why am I encountering this error and how can I resolve it?

答案1

得分: 1

多样性模块直接位于skbio下,您的导入语句应该是:

from skbio.diversity import beta_diversity
英文:

The diversity module is directly under skbio, your import statement should be:

from skbio.diversity import beta_diversity

huangapple
  • 本文由 发表于 2023年5月21日 04:25:56
  • 转载请务必保留本文链接:https://go.coder-hub.com/76297221.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定