Skip to content

Latest commit

 

History

History
45 lines (36 loc) · 976 Bytes

2.building.md

File metadata and controls

45 lines (36 loc) · 976 Bytes

Building the main branch of scikit-learn

To build scikit-learn from source, we need to make sure that we have scikit-learn build dependencies installed first:

$ conda install numpy scipy cython  # should be already installed
$ cd scikit-learn/
$ pip install --verbose --no-build-isolation -e .
$ cd ..
$ pip show scikit-learn

We can check that we can import scikit-learn in an interactive IPython session:

Install ipython:

$ conda install ipython

Then launch it to import scikit-learn

$ ipython
>>> import sklearn
>>> sklearn.__version__
1.1.dev0
>>> sklearn.show_versions()
[...] more details
CTRL-D

Many Python projects follow similar coding and packaging conventions. For instance, if you also want to build numpy from source (optional), you can do as follows:

$ cd numpy/
$ pip install --verbose --no-build-isolation -e .
$ cd ..
$ pip show numpy
$ ipython
>>> import numpy as np
>>> print(np.__version__)
1.xx.dev0+xxxxx
CTRL-D