我尝试在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'
我已通过以下步骤解决了这个问题:
pip open-smart 1.9.0
pip gensim 3.4.0
这对我有用