Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An sklearn installation error occurred while running setup.py in step-8 of FeTS 2022 Challenge Task 1. #88

Open
sunyeongan opened this issue Mar 6, 2024 · 5 comments

Comments

@sunyeongan
Copy link
Contributor

sunyeongan commented Mar 6, 2024

Describe the bug
A clear and concise description of what the bug is.
During step 8 in https://github.com/FeTS-AI/Challenge/tree/main/Task_1 , a sklearn installation error occurred while executing 'fets @ git+https://github.com/FETS-AI/Algorithms.git@fets_challenge', among install_requires in setup.py.

To Reproduce
Steps to reproduce the behavior:

  1. Execute step8 (pip install .) command in https://github.com/FeTS-AI/Challenge/tree/main/Task_1
  2. Error occurred at line 33 of the setup.py code https://github.com/FeTS-AI/Challenge/blob/main/Task_1/setup.py

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.
FeTs_error

FeTS Version
Version information is found on Help > About

Desktop (please complete the following information):

  • OS: window10
  • Version : 22hz

Additional context
After cloning FeTS-AI/Algorithms to my GitHub, change sklearn in the 14th line code of https://github.com/sunyeongan/Algorithms/blob/master/setup.py to scikit-learn.

@sarthakpati
Copy link
Member

Thanks for the report! Can you please put the PR so that we can record your contribution?

@sunyeongan
Copy link
Contributor Author

When executing the command below
https://github.com/FeTS-AI/Challenge/blob/524d6b9f489ba852d601a437839abd937e5cab89/Task_1/README.md?plain=1#L29

Even after fixing it, a similar error occurs.
fets_3


  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [15 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
      [end of output]

It seems like sklearn is being loaded again from somewhere. I haven't found out where that is yet. Does requirement.txt file exist?

@sarthakpati
Copy link
Member

That's weird. I don't think a separate requirements.txt file exists, though.

@sunyeongan
Copy link
Contributor Author

Found the problem.

image

install_requires=['protobuf', 'grpcio', 'tqdm', 'coloredlogs', 'nibabel', 'scikit-learn', 'nnUNet==1.6.6', 'batchgenerators==0.21', 'opencv-python', 'MedPy==0.4.0']

The version of nnUnet is version 1.6.6, and sklearn is used here.

https://github.com/MIC-DKFZ/nnUNet/releases/tag/v1.6.6

Version 1.7.0 of nnUnet uses scikit-learn. So, when I changed the nnUnet version of setup.py in the repository cloned from my GitHub to 1.7.0, the following error occurred.

Collecting dicom2nifti (from nnUNet==1.7.0->fets@ git+https://github.com/sunyeongan/Algorithms.git@6b1ee7dba53f84d068f58b2996393b7bb0c63c35->fets-challenge==2.0)
  Downloading dicom2nifti-2.4.10-py3-none-any.whl.metadata (1.3 kB)
INFO: pip is looking at multiple versions of nnunet to determine which version is compatible with other requirements. This could take a while.
ERROR: Cannot install fets and fets-challenge because these package versions have conflicting dependencies.

The conflict is caused by:
    fets 0.0.1 depends on batchgenerators==0.21
    nnunet 1.7.0 depends on batchgenerators>=0.23

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

I think we need to change the version of nnUnet in setup.py to 1.7.0.
What do you think?

@sarthakpati
Copy link
Member

If you can confirm that this will work as expected, then please put a PR in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants