导入gensim并收到TypeError:预期的字节,找到描述符

问题描述 投票:0回答:1

我尝试在python3中导入gensim库。所有的库都是最新版本。在首次导入时获得了TypeError: expected bytes, Descriptor found在第二次导入时出现此错误:

 import gensim

> AttributeError                            Traceback (most recent call last)
<ipython-input-7-e70e92d32c6e> in <module>
----> 1 import gensim

~\Anaconda3\lib\site-packages\gensim\__init__.py in <module>
      3 """
      4 

~\Anaconda3\lib\site-packages\smart_open\transport.py in <module>
     20 NO_SCHEME = ''
     21 
---> 22 _REGISTRY = {NO_SCHEME: smart_open.local_file}
     23 
     24 

AttributeError: module 'smart_open' has no attribute 'local_file'
python import typeerror gensim attributeerror
1个回答
0
投票

我已通过以下步骤解决了这个问题:

pip open-smart 1.9.0
pip gensim 3.4.0

这对我有用

© www.soinside.com 2019 - 2024. All rights reserved.