【问题标题】:Error with calling Numpy, Scipy, Gensim in python3在 python3 中调用 Numpy、Scipy、Gensim 时出错
【发布时间】:2019-06-09 07:15:48
【问题描述】:

为什么我在linux中用python3调用Numpy、Scipy、Gensim时出现如下错误?

>import gensim
_concrete_types = {v.type for k, v in _concrete_typeinfo.items()}
AttributeError: 'tuple' object has no attribute 'type'

【问题讨论】:

  • 嗨,AttributeError: 'tuple' object has no attribute 'type,你是如何准确调用 numpy、scipy 或 gensim 的?请提供一些minimal reproducible example 代码,以便人们尝试缩小问题范围。
  • 你的操作系统是什么? Python 和 gensim 是如何安装的?您如何运行import gensim 行?这真的是响应中显示的完整错误信息吗? (您是同一个人,还是在同一系统/问题上工作,是一天前发布类似问题 stackoverflow.com/questions/54187308/…> 的人?)

标签: python python-3.x numpy scipy gensim


【解决方案1】:

我今天也观察到了这个问题,但使用的工具仅依赖于 pandas 作为 numpy.

我在这里也看到了类似的问题:AttributeError: 'tuple' object has no attribute 'type' upon importing tensorflow

我无法将此添加为评论,因为我没有足够的声誉,所以请原谅我。

*edit 查看另一个线程以获得答案:它是新的 numpy 版本。

【讨论】:

    猜你喜欢
    • 2017-11-27
    • 2021-04-27
    • 2012-03-26
    • 2011-02-11
    • 2016-01-05
    • 2021-05-30
    • 1970-01-01
    • 2015-02-25
    • 1970-01-01
    相关资源
    最近更新 更多