Skip to content

How Do You Install Auto-sklearn in Google Colab? #1684

@tron27

Description

@tron27

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions