无法通过 conda 或 pip 安装 auto-sklearn ubuntu 24.04

问题描述 投票:0回答:1

我在window和ubuntu 24.04上安装这个库时遇到问题,这是ubuntu,请帮忙! 我尝试了其他库,例如 TPOT,即使成功但仍然无法导入。

用点: 错误:

        File "<string>", line 293, in setup_package
      ModuleNotFoundError: No module named 'numpy.distutils'
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

与康达: 错误:

    conda install conda-forge::auto-sklearn
Channels:
 - defaults
 - conda-forge
Platform: linux-64
Collecting package metadata (repodata.json): done
Solving environment: / warning  libmamba Added empty dependency for problem type SOLVER_RULE_UPDATE
failed

LibMambaUnsatisfiableError: Encountered problems while solving:
  - package auto-sklearn-0.12.5-pyhd8ed1ab_0 requires pyrfr >=0.8.1,<0.9, but none of the providers can be installed

Could not solve for environment specs
The following packages are incompatible
├─ auto-sklearn is installable and it requires
│  └─ pyrfr >=0.8.1,<0.9  with the potential options
│     ├─ pyrfr [0.8.1|0.8.2] would require
│     │  └─ python >=3.6,<3.7.0a0 , which can be installed;
│     ├─ pyrfr [0.8.1|0.8.2|0.8.3] would require
│     │  └─ python >=3.7,<3.8.0a0 , which can be installed;
│     ├─ pyrfr [0.8.1|0.8.2|0.8.3] would require
│     │  └─ python >=3.8,<3.9.0a0 , which can be installed;
│     ├─ pyrfr [0.8.1|0.8.2|0.8.3] would require
│     │  └─ python >=3.9,<3.10.0a0 , which can be installed;
│     ├─ pyrfr [0.8.2|0.8.3] would require
│     │  └─ python >=3.10,<3.11.0a0 , which can be installed;
│     └─ pyrfr 0.8.3 would require
│        └─ python >=3.11,<3.12.0a0 , which can be installed;
└─ pin-1 is not installable because it requires
   └─ python 3.12.* , which conflicts with any installable versions previously reported.
python pip conda
1个回答
0
投票

 ModuleNotFoundError: No module named 'numpy.distutils'
仅在编译 numpy 时出现,只有当您尝试安装的 numpy 版本(或作为依赖项的 pip)没有适用于您的 python 版本的 whl 文件时才会发生这种情况。由于 numpy 非常擅长为所有与其兼容的 Python 版本提供 whl 文件。所有这些都表明您的 python 版本与您尝试安装的软件包不兼容。 conda 错误朝同一方向发展,您有 python 3.12,因此有该版本的 pin,但它与包的要求不兼容。

您可以尝试创建一个新的环境,它应该选择兼容版本的 python:

conda create -n autoskleran python auto-sklearn

	
© www.soinside.com 2019 - 2024. All rights reserved.