Tom Tom
Tom Tom

Reputation: 352

Cannot install auto-sklearn ubuntu 24.04 via conda or pip

I meet issue install this library on both window and ubuntu 24.04, and this is ubuntu, plz help! I try other library like TPOT, even successful but still cannot import.

with pip: error:

        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.

with conda: error:

    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.

Upvotes: -2

Views: 211

Answers (1)

FlyingTeller
FlyingTeller

Reputation: 20482

ModuleNotFoundError: No module named 'numpy.distutils' only comes when numpy is being compiled, something that only happens if the numpy version you (or pip as a dependency) is trying to install does not have a whl file for your python version. Since numpy is very good in providing whl files for all python versions that it is compatible to. All that points towards your python version not being compatible with the package you are trying to install.

The conda error goes in the same direction, you have python 3.12 and therefor a pin for that version, but it is incompatible with the requirements of the package.

You can try creating a fresh environment, which should pick up a compatible version of python:

conda create -c conda-forge -n autoskleran python auto-sklearn

On my ubuntu machine, it picks up python 3.9, which is in accordance to the compatibility listed on PyPi

Upvotes: 1

Related Questions