Numba 和 llvmlite 不会安装在 sage cygwin 上

Numba and llvmlite won't install on sage cygwin

即使在 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 of supported platforms, which does not currently include cygwin. There is, however, a somewhat recent pull request添加cygwin支持,但尚未审核。

P.S。 conda 不支持 cygwin