-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
How Do You Install Auto-sklearn in Google Colab? #1684
Comments
Hey @tron27, Yeah it drove me a bit nuts for a while too. I took bits and pieces from #1675 and #1681 and ultimately got it working like so (messy, silly, but working): Working in Python 3.10.12, Part 1: Step 1. a first bit of package management:
Step 2. I install a few packages here I need for my analyses Step 3. uninstall some more packages at this point i.e. that came with step 2) that conflict with the older scikitlearn I install at step 4.
Step 4. install old scikit learn Step 5. install autoskl Part 2: Step 6. try importing autoskl rerun
Step 7. try importing autoskl again rerun
Step 8. try importing autoskl a third time rerun
Step 9. now when you try importing autoskl again it will work fully!
|
Anthony, |
Based on @anthonyromyn 's post, I followed these steps:
It's just a workaround. But it serves until the correction is done for Python 3.10. |
The following code from https://stackoverflow.com/questions/53839948/how-to-install-auto-sklearn-on-googlecolab worked for me
|
Edit: In my case - Tried all of the above solutions, getting the same err mostly: Collecting scikit-learn<0.25.0,>=0.24.0 (from auto-sklearn) × Preparing metadata (pyproject.toml) did not run successfully. note: This error originates from a subprocess, and is likely not a problem with pip. I also tried solving the issue using condacolab... and the thing gets more descriptive imho: ... Setting up condacolab ... Install auto-sklearn from the conda-forge channel!mamba install -c conda-forge auto-sklearn scikit-learn python=3.9 # Tried it first with auto-sklearn only (py3.10) - similar output (see bellow) conda-forge/linux-64 Using cache Pinned packages:
warning libmamba Added empty dependency for problem type SOLVER_RULE_UPDATE |
Hello all,
This is from "Fails when installing via pip #1681 ! I read through this discussion and I'm still confused on how to install auto-sklearn in Google Colab. I've attempted to install auto-sklearn version 0.15.0.
I realized that this issue is closed, but I just came across it. I've been struggling with getting auto-sklearn to work properly for about 3 days now. I've downgraded my python version from 3.10.12 to 3.9.18 in Google Colab. Though, I was able to install auto-sklearn, I'm unable to import it or any of it's other functions such as classification. Attached is my Google Colab file (in pdf format). Any help is greatly appreciated. I've sincerely tried to figure this out, but it's above my capabilities at this point. Much of the code in this file came from stackoverflow. I understood it enough to use it.
Environment and installation:
Details about my installation:
Ubuntu 22.04 - In Google Colab
Python version 3.9.18
Auto-sklearn version
Code used in Google Colab (Also attached in a pdf file):
!python --version # Python 3.10.12
install python 3.9
!sudo apt-get update -y
!sudo apt-get install python3.9
change alternatives
!sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.9 1
check python version
!python --version # Python 3.9.18
install pip for new python
!sudo apt-get install python3.9-distutils
!wget https://bootstrap.pypa.io/get-pip.py
!python get-pip.py
credit of these last two commands belongs to @erik
install colab's dependencies
!python -m pip install ipython ipython_genutils ipykernel jupyter_console prompt_toolkit httplib2 astor
link to the old google package
!ln -s /usr/local/lib/python3.9/dist-packages/google
See list of installed Python Versions
!sudo update-alternatives --config python3
install linux dependencies
!sudo apt-get install build-essential swig python3-dev
!pip install auto-sklearn # This works!
import autosklearn
import autosklearn. # This does not work!
Auto-sklearn Install.ipynb - Colaboratory.pdf
The text was updated successfully, but these errors were encountered: