BorgwardtLab / reComBat

reComBat package to correct batch effects
BSD 3-Clause "New" or "Revised" License
10 stars 2 forks source link

pip installation uses deprecated sklearn instead of new scikit-learn package check. #4

Open alexandriatran opened 1 year ago

alexandriatran commented 1 year ago

I've pasted the error message I got below. I already have scikit-learn installed in my system and will probably be able fix it for myself locally. Submitting an issue so you can resolved the official PyPI package for others.

Collecting sklearn<0.1,>=0.0 (from reComBat)
  Downloading sklearn-0.0.post5.tar.gz (3.7 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [18 lines of output]
      The 'sklearn' PyPI package is deprecated, use 'scikit-learn'
      rather than 'sklearn' for pip commands.

      Here is how to fix this error in the main use cases:
      - use 'pip install scikit-learn' rather than 'pip install sklearn'
      - replace 'sklearn' by 'scikit-learn' in your pip requirements files
        (requirements.txt, setup.py, setup.cfg, Pipfile, etc ...)
      - if the 'sklearn' package is used by one of your dependencies,
        it would be great if you take some time to track which package uses
        'sklearn' instead of 'scikit-learn' and report it to their issue tracker
      - as a last resort, set the environment variable
        SKLEARN_ALLOW_DEPRECATED_SKLEARN_PACKAGE_INSTALL=True to avoid this error
evabalini commented 10 months ago

I encountered the same problem and can't install the package at all

sreichl commented 8 months ago

same here when using it in my workflow https://github.com/epigen/spilterlize_integrate/tree/main

Please fix it so we can benefit from this very nice package again.

Maybe even include it in conda(-forge)?

Thanks for your efforts!

sreichl commented 8 months ago

this seems to be the issue: https://github.com/scikit-learn/sklearn-pypi-package

kvetab commented 8 months ago

Hi there, experiencing the same issue. I'd really appreciate a fix!

sreichl commented 5 months ago

It works if you install all dependencies separately and then only reComBat using pip with the no-dependency flag

pip install recombat==0.1.4 --no-deps

When using Snakemake I leveraged the post-deployment-scrip functionality, which enables subsequent execution of a script within the specified environment.

https://github.com/epigen/spilterlize_integrate/blob/fbf3b15de275c8a3bd8416901c2545e22a9a44ac/workflow/envs/reComBat.yaml

https://github.com/epigen/spilterlize_integrate/blob/fbf3b15de275c8a3bd8416901c2545e22a9a44ac/workflow/envs/reComBat.post-deploy.sh