macs10.15.7 和 3.9.0 上的 gensim 安装错误
gensim installation error on macs10.15.7 with 3.9.0
我尝试通过 pip install gensim
安装 gensim,但在 python 中的 macs10.15.7 Catalina 上出现以下一堆错误而失败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('"'"'\r\n'"'"', '"'"'\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
我用谷歌搜索,但找不到任何解决方案。有人可以分享一些指针
根据 main gensim pages 的说法,它可能还没有为 Python 3.9 做好准备。
"Gensim 正在 Python 3.5、3.6、3.7 和 3.8 下持续测试。在 gensim 4.0.0 中删除了对 Python 2.7 的支持 - 如果必须使用,请安装 gensim 3.8.3 Python2.7
您可以将 Python 版本“降级”到 3.5/3.6/3.7 或 3.8,它应该可以工作。
我尝试通过 pip install gensim
安装 gensim,但在 python 中的 macs10.15.7 Catalina 上出现以下一堆错误而失败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('"'"'\r\n'"'"', '"'"'\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
我用谷歌搜索,但找不到任何解决方案。有人可以分享一些指针
根据 main gensim pages 的说法,它可能还没有为 Python 3.9 做好准备。
"Gensim 正在 Python 3.5、3.6、3.7 和 3.8 下持续测试。在 gensim 4.0.0 中删除了对 Python 2.7 的支持 - 如果必须使用,请安装 gensim 3.8.3 Python2.7
您可以将 Python 版本“降级”到 3.5/3.6/3.7 或 3.8,它应该可以工作。