问题描述
即使在SageMath 9.1 Shell的管理员下,我也无法安装numba
(buildchain可能已损坏,是否有解决方法-conda install
?)。
Numba将有助于重塑矩阵和内容。
$ sage --pip install numba
Collecting numba
Using cached files.pythonhosted.org/packages/5e/81/6fd1dd064bcf71a79da109e8966a39e2da61d68bf0bd1e0839fa997f8c41/numba-0.51.2.tar.gz
Collecting llvmlite<0.35,>=0.34.0.dev0 (from numba)
Using cached files.pythonhosted.org/packages/0b/96/07bfa93a103fb9e3e9ae7f9f7c6687ae714aee66b6f3000da3fad71e0aa2/llvmlite-0.34.0.
<......>
Traceback (most recent call last):
File "/tmp/pip-install-ju72yen0/llvmlite/ffi/build.py",line 191,in <module>
main()
File "/tmp/pip-install-ju72yen0/llvmlite/ffi/build.py",line 187,in main
raise RuntimeError("unsupported platform: %r" % (sys.platform,))
RuntimeError: unsupported platform: 'cygwin'
error: command '/opt/sagemath-9.1/local/bin/python3.exe' Failed with exit status 1
----------------------------------------
**Command "/opt/sagemath-9.1/local/bin/python3.exe -u -c "import setuptools,tokenize;__file__='/tmp/pip-install-ju72yen0/llvmlite/setup.py';f=getattr(tokenize,'open',open)(__file__);code=f.read().replace('\r\n','\n');f.close();exec(compile(code,__file__,'exec'))" install --record /tmp/pip-record-oiztj3wr/install-record.txt --single-version-externally-managed --compile" Failed with error code 1 in /tmp/pip-install-ju72yen0/llvmlite/**
解决方法
我认为这里的问题很清楚:llvmlite是numba的依赖项,不支持Cygwin。
似乎在llvmlite构建脚本中,有an explicit check个受支持的平台,该平台当前不包括cygwin。但是,最近有些pull request添加了cygwin支持,但尚未进行审核。
P.S。 conda不支持cygwin