scikit-sparse安装

scikit-sparse安装报错如下,可以用如下用

conda install -c conda-forge scikit-sparse

测试:

from sksparse.cholmod import cholesky

ref: GitHub - EmJay276/scikit-sparse: Sparse matrix tools extending scipy.sparse, but with incompatible licenses

报错:

ERROR: Command errored out with exit status 1:
   command: /home/ubuntu/miniconda3/envs/hhh/bin/python /home/ubuntu/miniconda3/envs/hhh/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py get_requires_for_build_wheel /tmp/tmp0yaqjjnd
       cwd: /tmp/pip-install-xty9oemb/scikit-sparse_3a6979a4628d461ebb0011a51307aec2
  Complete output (39 lines):
  performance hint: sksparse/cholmod.pyx:379:5: Exception check on '_error_handler' will always require the GIL to be acquired.
  Possible solutions:
  	1. Declare '_error_handler' as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
  	2. Use an 'int' return type on '_error_handler' to allow an error code to be returned.
  
  Error compiling Cython file:
  ------------------------------------------------------------
  ...
          cholmod_c_start(&self._common)
          assert (_use_long == 0 and self._common.itype == CHOLMOD_INT) \
              or (_use_long == 1 and self._common.itype == CHOLMOD_LONG)
          self._common.print = 0
          self._common.error_handler = (
              <void (*)(int, const char *, int, const char *)>_error_handler)
              ^
  ------------------------------------------------------------
  
  sksparse/cholmod.pyx:435:12: Cannot assign type 'void (*)(int, const char *, int, const char *) except *' to 'void (*)(int, const char *, int, const char *) noexcept'. Exception values are incompatible. Suggest adding 'noexcept' to the type of the value being assigned.
  Compiling sksparse/cholmod.pyx because it changed.
  [1/1] Cythonizing sksparse/cholmod.pyx
  Traceback (most recent call last):
    File "/home/ubuntu/miniconda3/envs/DIPP/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 349, in <module>
      main()
    File "/home/ubuntu/miniconda3/envs/DIPP/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 331, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "/home/ubuntu/miniconda3/envs/DIPP/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 117, in get_requires_for_build_wheel
      return hook(config_settings)
    File "/tmp/pip-build-env-q_rue99g/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 332, in get_requires_for_build_wheel
      return self._get_build_requires(config_settings, requirements=[])
    File "/tmp/pip-build-env-q_rue99g/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 302, in _get_build_requires
      self.run_setup()
    File "/tmp/pip-build-env-q_rue99g/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 318, in run_setup
      exec(code, locals())
    File "<string>", line 88, in <module>
    File "/tmp/pip-build-env-q_rue99g/overlay/lib/python3.8/site-packages/Cython/Build/Dependencies.py", line 1154, in cythonize
      cythonize_one(*args)
    File "/tmp/pip-build-env-q_rue99g/overlay/lib/python3.8/site-packages/Cython/Build/Dependencies.py", line 1321, in cythonize_one
      raise CompileError(None, pyx_file)
  Cython.Compiler.Errors.CompileError: sksparse/cholmod.pyx
  ----------------------------------------
WARNING: Discarding https://pypi.tuna.tsinghua.edu.cn/packages/ca/91/94db555d5c7b0f75ecdf14802613409b9977aa8a92d0925863051e59c17b/scikit-sparse-0.4.6.tar.gz#sha256=f2de653920c2adf666de5c8a28abaa9f2218a1001d2d96e403a1f553938561c3 (from https://pypi.tuna.tsinghua.edu.cn/simple/scikit-sparse/) (requires-python:>=3.6, <3.10). Command errored out with exit status 1: /home/ubuntu/miniconda3/envs/hhh/bin/python /home/ubuntu/miniconda3/envs/hhh/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py get_requires_for_build_wheel /tmp/tmp0yaqjjnd Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement scikit-sparse==0.4.6 (from versions: 0.3, 0.3.1, 0.4, 0.4.1, 0.4.2, 0.4.3, 0.4.4, 0.4.5, 0.4.6, 0.4.7, 0.4.8, 0.4.11, 0.4.12, 0.4.13, 0.4.15)
ERROR: No matching distribution found for scikit-sparse==0.4.6

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值