我正在这样做并收到此错误:
from gensim.models import Word2Vec
ImportError: cannot import name 'open' from 'smart_open' (C:\ProgramData\Anaconda3\lib\site-packages\smart_open\__init__.py)
然后我这样做了:
import smart_open
dir(smart_open)
['BZ2File','BytesIO','DEFAULT_ERRORS','IS_PY2','P','PATHLIB_SUPPORT','SSLError','SYSTEM_ENCODING','Uri','__builtins__','__cached__','__doc__','__file__','__loader__','__name__','__package__','__path__','__spec__','boto','codecs','collections','gzip','hdfs','http','importlib','io','logger','logging','os','pathlib','pathlib_module','requests','s3','s3_iter_bucket','six','smart_open','smart_open_hdfs','smart_open_http','smart_open_lib','smart_open_s3','smart_open_webhdfs','sys','urlparse','urlsplit','warnings','webhdfs']
如您所见,其中没有“开放”,所以我应该如何解决这个问题。我尝试安装不同的版本,我也升级了所有版本。