How to run JupyterLab with PyPy and scikit-learn-intelex?

110 Views Asked by At

I'm using Miniconda and created an environment following the documentation:

conda create -c conda-forge -n pypy-env pypy python=3.9
conda activate pypy-env
conda config --set channel_priority strict

After installing the packages I need, installing scikit-learn-intelex returns:

(pypy-env) C:\Users\user>conda install --name pypy-env -c conda-forge scikit-learn-intelex
Channels:
 - conda-forge
 - defaults
Platform: win-64
Collecting package metadata (repodata.json): done
Solving environment: | warning  libmamba Problem type not implemented SOLVER_RULE_STRICT_REPO_PRIORITY
done

## Package Plan ##

  environment location: C:\Users\user\AppData\Local\miniconda3\envs\pypy-env

  added / updated specs:
    - scikit-learn-intelex


The following NEW packages will be INSTALLED:

  daal4py            conda-forge/win-64::daal4py-2023.2.1-py39h6d95a06_0
  pyqt               conda-forge/win-64::pyqt-5.15.9-py39hb77abff_4
  pyqt5-sip          conda-forge/win-64::pyqt5-sip-12.12.2-py39h99910a6_4
  scikit-learn       conda-forge/win-64::scikit-learn-1.3.0-py39hfa9d973_0
  scikit-learn-inte~ conda-forge/win-64::scikit-learn-intelex-2023.2.1-py39hcbf5309_0

The following packages will be REMOVED:

  pypy-7.3.12-0_pypy39
  pypy3.9-7.3.12-h994e1e7_3

The following packages will be UPDATED:

  jupyter_client                                 5.3.3-py_0 --> 8.3.1-pyhd8ed1ab_0
  jupyter_core       conda-forge/noarch::jupyter_core-4.5.~ --> conda-forge/win-64::jupyter_core-5.3.1-py39hcbf5309_0
  pandas                               2.0.3-py39haf6a60e_1 --> 2.1.0-py39h32e6231_0
  python                                   3.9.17-0_73_pypy --> 3.9.18-h4de0772_0_cpython

The following packages will be DOWNGRADED:

  argon2-cffi-bindi~                  21.2.0-py39h7a188e9_3 --> 21.2.0-py39ha55989b_3
  brotli-python                        1.0.9-py39h3665ca7_9 --> 1.0.9-py39h99910a6_9
  cffi                                1.15.1-py39h68485e5_3 --> 1.15.1-py39h68f70e3_3
  contourpy                            1.1.0-py39h314d263_0 --> 1.1.0-py39h1f6ef14_0
  debugpy                              1.6.8-py39h3665ca7_0 --> 1.6.8-py39h99910a6_0
  fonttools                           4.42.1-py39h7a188e9_0 --> 4.42.1-py39ha55989b_0
  imagecodecs                      2023.8.12-py39h8ff80d2_0 --> 2023.8.12-py39had998c7_0
  kiwisolver                           1.4.5-py39h314d263_0 --> 1.4.5-py39h1f6ef14_0
  markupsafe                           2.1.3-py39h7a188e9_0 --> 2.1.3-py39ha55989b_0
  matplotlib                           3.7.2-py39h0d475fb_0 --> 3.7.2-py39hcbf5309_0
  matplotlib-base                      3.7.2-py39h2392a8f_0 --> 3.7.2-py39ha3e071c_0
  numpy                               1.25.2-py39h821adfb_0 --> 1.25.2-py39h816b6a6_0
  pillow                              10.0.0-py39hf8900f3_0 --> 10.0.0-py39ha9166d5_0
  psutil                               5.9.5-py39h7a188e9_0 --> 5.9.5-py39ha55989b_0
  python_abi                              3.9-3_pypy39_pp73 --> 3.9-3_cp39
  pywavelets                           1.4.1-py39h8942a9a_0 --> 1.4.1-py39hc266a54_0
  pywin32                                304-py39h0d475fb_2 --> 304-py39h99910a6_2
  pywinpty                            2.0.11-py39h3665ca7_0 --> 2.0.11-py39h99910a6_0
  pyyaml                               6.0.1-py39h7a188e9_0 --> 6.0.1-py39ha55989b_0
  pyzmq                               25.1.1-py39hc8fc7ba_0 --> 25.1.1-py39hea35a22_0
  rpds-py                             0.10.0-py39h3fc3a88_0 --> 0.10.0-py39hf21820d_0
  scikit-image                        0.21.0-py39h3665ca7_0 --> 0.21.0-py39h99910a6_0
  scipy                               1.11.2-py39hbf2a3dc_0 --> 1.11.2-py39hde5eda1_0
  sip                                 6.7.11-py39h3665ca7_0 --> 6.7.11-py39h99910a6_0
  tornado                              6.3.3-py39h7a188e9_0 --> 6.3.3-py39ha55989b_0
  unicodedata2                        15.0.0-py39h7a188e9_0 --> 15.0.0-py39ha55989b_0


Proceed ([y]/n)? y

If I proceed and try to reinstall PyPy afterwards, this returns:

(pypy-env) C:\Users\user>conda install --name pypy-env -c conda-forge pypy
Channels:
 - conda-forge
 - defaults
Platform: win-64
Collecting package metadata (repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: C:\Users\user\AppData\Local\miniconda3\envs\pypy-env

  added / updated specs:
    - pypy


The following NEW packages will be INSTALLED:

  pypy               conda-forge/noarch::pypy-7.3.12-0_pypy39
  pypy3.9            conda-forge/win-64::pypy3.9-7.3.12-h994e1e7_3

The following packages will be REMOVED:

  daal4py-2023.2.1-py39h6d95a06_0
  pyqt-5.15.9-py39hb77abff_4
  pyqt5-sip-12.12.2-py39h99910a6_4
  scikit-learn-1.3.0-py39hfa9d973_0
  scikit-learn-intelex-2023.2.1-py39hcbf5309_0

The following packages will be SUPERSEDED by a higher-priority channel:

  jupyter_core       conda-forge/win-64::jupyter_core-5.3.~ --> conda-forge/noarch::jupyter_core-4.5.0-py_0

The following packages will be DOWNGRADED:

  argon2-cffi-bindi~                  21.2.0-py39ha55989b_3 --> 21.2.0-py39h7a188e9_3
  brotli-python                        1.0.9-py39h99910a6_9 --> 1.0.9-py39h3665ca7_9
  cffi                                1.15.1-py39h68f70e3_3 --> 1.15.1-py39h68485e5_3
  contourpy                            1.1.0-py39h1f6ef14_0 --> 1.1.0-py39h314d263_0
  debugpy                              1.6.8-py39h99910a6_0 --> 1.6.8-py39h3665ca7_0
  fonttools                           4.42.1-py39ha55989b_0 --> 4.42.1-py39h7a188e9_0
  imagecodecs                      2023.8.12-py39had998c7_0 --> 2023.8.12-py39h8ff80d2_0
  jupyter_client                         8.3.1-pyhd8ed1ab_0 --> 5.3.3-py_0
  kiwisolver                           1.4.5-py39h1f6ef14_0 --> 1.4.5-py39h314d263_0
  markupsafe                           2.1.3-py39ha55989b_0 --> 2.1.3-py39h7a188e9_0
  matplotlib                           3.7.2-py39hcbf5309_0 --> 3.7.2-py39h0d475fb_0
  matplotlib-base                      3.7.2-py39ha3e071c_0 --> 3.7.2-py39h2392a8f_0
  numpy                               1.25.2-py39h816b6a6_0 --> 1.25.2-py39h821adfb_0
  pandas                               2.1.0-py39h32e6231_0 --> 2.0.3-py39haf6a60e_1
  pillow                              10.0.0-py39ha9166d5_0 --> 10.0.0-py39hf8900f3_0
  psutil                               5.9.5-py39ha55989b_0 --> 5.9.5-py39h7a188e9_0
  python                          3.9.18-h4de0772_0_cpython --> 3.9.17-0_73_pypy
  python_abi                                     3.9-3_cp39 --> 3.9-3_pypy39_pp73
  pywavelets                           1.4.1-py39hc266a54_0 --> 1.4.1-py39h8942a9a_0
  pywin32                                304-py39h99910a6_2 --> 304-py39h0d475fb_2
  pywinpty                            2.0.11-py39h99910a6_0 --> 2.0.11-py39h3665ca7_0
  pyyaml                               6.0.1-py39ha55989b_0 --> 6.0.1-py39h7a188e9_0
  pyzmq                               25.1.1-py39hea35a22_0 --> 25.1.1-py39hc8fc7ba_0
  rpds-py                             0.10.0-py39hf21820d_0 --> 0.10.0-py39h3fc3a88_0
  scikit-image                        0.21.0-py39h99910a6_0 --> 0.21.0-py39h3665ca7_0
  scipy                               1.11.2-py39hde5eda1_0 --> 1.11.2-py39hbf2a3dc_0
  sip                                 6.7.11-py39h99910a6_0 --> 6.7.11-py39h3665ca7_0
  tornado                              6.3.3-py39ha55989b_0 --> 6.3.3-py39h7a188e9_0
  unicodedata2                        15.0.0-py39ha55989b_0 --> 15.0.0-py39h7a188e9_0


Proceed ([y]/n)?

Trying to install the standard scikit-learn results in the same. How can I resolve this?

Edit: I could resolve this by running:

conda create -c conda-forge -n pypy-env pypy
conda activate pypy-env
conda config --set channel_priority strict
conda install -c conda-forge scikit-learn-intelex
1

There are 1 best solutions below

2
mattip On

scikit-learn is not available on conda for PyPy. If you want to use it, you will have to build from source.