gensim安装错误在macs10.15.7与3.9.0



我尝试通过pip install gensim安装gensim,但它失败了,在macs10.15.7 Catalina上出现以下错误堆python 3.9

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/cmath:649:25: error: no template named 'numeric_limits'
return _FloatBigger ? numeric_limits<_IntT>::max() :  (numeric_limits<_IntT>::max() >> _Bits << _Bits);
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
220 warnings and 20 errors generated.
error: command '/usr/bin/clang' failed with exit code 1
----------------------------------------
ERROR: Command errored out with exit status 1: ~/.pyenv/versions/3.9.0/envs/jupyter/bin/python3.9 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/pg/1drqvjn54tbczc1pl5qd8qwh0000gp/T/pip-install-ndvn1a9y/gensim_2b2eae30f7e140c0af90d98d9e598905/setup.py'"'"'; __file__='"'"'/private/var/folders/pg/1drqvjn54tbczc1pl5qd8qwh0000gp/T/pip-install-ndvn1a9y/gensim_2b2eae30f7e140c0af90d98d9e598905/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/pg/1drqvjn54tbczc1pl5qd8qwh0000gp/T/pip-record-_xbpvhdn/install-record.txt --single-version-externally-managed --compile --install-headers ~/.pyenv/versions/3.9.0/envs/jupyter/include/site/python3.9/gensim

我搜索了一下,找不到任何解决方案。谁能分享一些指针

根据一个主要的gensim页面,它可能还没有为Python 3.9做好准备。

"Gensim正在Python 3.5, 3.6, 3.7和3.8下持续测试。对Python 2.7的支持在gensim 4.0.0中被删除-如果你必须使用Python 2.7">

请安装gensim 3.8.3你可以"降级"把Python版本调到3.5/3.6/3.7或3.8,它应该可以工作了。

最新更新