Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] An error occurs while installing autosklearn #1690

Open
yevIbrahimov opened this issue Sep 11, 2023 · 9 comments
Open

[Question] An error occurs while installing autosklearn #1690

yevIbrahimov opened this issue Sep 11, 2023 · 9 comments

Comments

@yevIbrahimov
Copy link

yevIbrahimov commented Sep 11, 2023

I try to install auto-sklearn to google colab using command !pip3 install auto-sklearn but I receive such log

Collecting auto-sklearn
Downloading auto-sklearn-0.15.0.tar.gz (6.5 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.5/6.5 MB 42.1 MB/s eta 0:00:00
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: setuptools in /usr/local/lib/python3.10/dist-packages (from auto-sklearn) (67.7.2)
Requirement already satisfied: typing-extensions in /usr/local/lib/python3.10/dist-packages (from auto-sklearn) (4.5.0)
Requirement already satisfied: distro in /usr/lib/python3/dist-packages (from auto-sklearn) (1.7.0)
Requirement already satisfied: numpy>=1.9.0 in /usr/local/lib/python3.10/dist-packages (from auto-sklearn) (1.23.5)
Requirement already satisfied: scipy>=1.7.0 in /usr/local/lib/python3.10/dist-packages (from auto-sklearn) (1.10.1)
Requirement already satisfied: joblib in /usr/local/lib/python3.10/dist-packages (from auto-sklearn) (1.3.2)
Collecting scikit-learn<0.25.0,>=0.24.0 (from auto-sklearn)
Downloading scikit-learn-0.24.2.tar.gz (7.5 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 7.5/7.5 MB 60.8 MB/s eta 0:00:00
Installing build dependencies ... done
Getting requirements to build wheel ... done
error: subprocess-exited-with-error

× Preparing metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
Preparing metadata (pyproject.toml) ... error
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.

It leads to error when I try to use autosklearn module import autosklearn.classification
ModuleNotFoundError Traceback (most recent call last)
in <cell line: 2>()
1 import numpy as np
----> 2 import autosklearn.classification
3 from sklearn.model_selection import train_test_split
4 from sklearn.linear_model import Perceptron
5 from sklearn.neural_network import MLPClassifier

ModuleNotFoundError: No module named 'autosklearn'

@yevIbrahimov yevIbrahimov changed the title [Question] An error occurs while installing autosklearn? [Question] An error occurs while installing autosklearn Sep 11, 2023
@AmirAlavi
Copy link

I'm not exactly sure, but it looks like it's failing when building scikit-learn 0.24.2. You can checkout #1675 for a workaround.

@GegznaV
Copy link

GegznaV commented Sep 17, 2023

@yevIbrahimov, which Python version do you use?

I had issues with both Python 3.10 and 3.11 and could install it to a Python 3.9-based environment.

@yevIbrahimov
Copy link
Author

@GegznaV I use python 3.10, but switching to 3.9 version still does not help me with this issue

@yevIbrahimov
Copy link
Author

@AmirAlavi
I tried to use these steps to solve this issue but I still get an error
!pip install Cython==0.29.36
!pip install scikit-learn==0.23 --no-build-isolation
Restart runtime
!pip install auto-sklearn

@GegznaV
Copy link

GegznaV commented Sep 19, 2023

I use Ubuntu (via WSL on Windows 10) with Conda as Python's virtual environment manager. Before the installation of auto-sklearn, there was nothing in the environment except Python and the dependencies requested by the Conda installer.

Actual steps I took are described here (assuming that Conda is installed):

@whoisltd
Copy link

whoisltd commented Sep 28, 2023

For python 3.10:
Install these packages line by line solve this problem:
scipy==1.8.1
Cython==0.29.35
scikit-learn==0.24.2 --no-build-isolation

@jonasboemer
Copy link

For python 3.10: Install these packages line by line solve this problem: scipy==1.8.1 Cython==0.29.35 scikit-learn==0.24.2 --no-build-isolation

works for me

@stupidoge
Copy link

stupidoge commented Nov 15, 2023

@whoisltd Hi Dat, it still cannot work on my colab.
image

@whoisltd
Copy link

@stupidoge
Not sure but on google colab, may you need to restart runtime when you change or reinstall new package version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants