Installation#

There are two ways to install the python package skscope depending on your main purpose.

Install official release#

This is the recommended approach for most users. Simply install the latest official release via pip:

pip install skscope

For Linux or Mac users, an alternative is

conda install skscope

Install library from source#

This is recommended if you want to work with the latest development version or if you wish to contribute to skscope.

1. First of all, make sure that you have a compiler with C++17 support installed. skscope is a python package with C++ extension, so a C++ Toolchain is required for building it. For Windows users, the easiest way to configure the C++ compile environment is to install the latest version of Visual Studio Community Edition and choose the “Desktop development with C++” workload. Here is a detailed tutorial.

  1. Then, clone the latest source code from GitHub and enter the directory of setup.py:

git clone git@github.com:abess-team/skscope.git --recurse-submodules
cd skscope

Note that --recurse-submodules is required since there are some submodules in the project.

  1. Finally, build the package from source using pip (in the editable mode):

pip install -e .

Thanks to the editable mode with the flag -e, we needn’t re-build the package skscope when the source python code changes.

If the dependence packages has been installed, we can build the package faster by

python setup.py develop

where the function of the flag develop is similar with -e of command pip.

This command will not check or prepare the required environment, so it can save a lot of time. Thus, we can use pip with first building and python with re-building.

Dependencies#

The current minimum dependencies to run skscope are:

  • numpy

  • nlopt

  • scikit-learn>=1.2.2

  • "jax[cpu]"