rs239 / velorama

Gene regulatory network inference for RNA velocity and pseudotime data
MIT License
22 stars 4 forks source link

setup.py calls sklearn instead of scikit-learn and prevents install #5

Open mcaponegro opened 11 months ago

mcaponegro commented 11 months ago

Hi,

I am reporting a potential issue with install/setup script. Velorama will not install natively on Linux with the following error. Does setup.py call a depreciated version of sklearn?

Collecting sklearn
  Using cached sklearn-0.0.post10.tar.gz (3.6 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

      More information is available at
      https://github.com/scikit-learn/sklearn-pypi-package

      If the previous advice does not cover your use case, feel free to report it at
      https://github.com/scikit-learn/sklearn-pypi-package/issues/new
      [end of output]
mcaponegro commented 11 months ago

exporting this variable in the terminal prior to calling pip install velorama allows install

export SKLEARN_ALLOW_DEPRECATED_SKLEARN_PACKAGE_INSTALL=True
Varix commented 3 months ago

thanks @mcaponegro , the work around is nice, but also for others who have same error and find this thread, we (you and I) dont want the deprecated version going forward... the setup.py file in the github actually has the scikit-learn fixed in the dependencies, but its not updated in pip which is still using the Oct 2022 version

the easy solution here is to

git clone https://github.com/rs239/velorama
cd velorama
pip install .

That way you get the bug fixes from 4 months ago and not last updated 2 years ago in pipy

BUT WAIT THERE IS MORE

by default you will still get an error =(

because setup.py calls another dependency by this author now, from schema-learn , which not only is outdated on pipy , BUT also the github is not a 1 to 1 of the pipy to begin with, there is no setup.py on the git for example... so in order to get all the updates you need to download that from pypi, change the dependencies, and then install local to meet the requirement for this before you can run the above commands.

i am working on a pull request to fix this for the author , but probably wont get it done till the weekend and will post and update when I do.

anyway hope thats helpful to someone out there