Skip to content
New issue

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

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

Already on GitHub? # to your account

Dependency resolving stuck when installing (not strict enough?) #1345

Closed
sTomerG opened this issue Mar 30, 2023 · 3 comments
Closed

Dependency resolving stuck when installing (not strict enough?) #1345

sTomerG opened this issue Mar 30, 2023 · 3 comments
Labels
maintenance Tasks related to infrastructure & dependencies resolution:duplicate This issue or pull request already exists

Comments

@sTomerG
Copy link

sTomerG commented Mar 30, 2023

Environment Details

Please indicate the following details about the environment in which you found the bug:

  • SDV version: 1.0.0
  • Python version: 3.9.16
  • Operating System: MacOS Ventura 13.2

Error Description

When installing these dependencies from a requirements.txt with pip install -r requirements.txt pip gets stuck in solving dependency relations (takes forever), with the following message

INFO: pip is looking at multiple versions of <package name> to determine which version is compatible with other requirements. This could take a while.
INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. See https://pip.pypa.io/warnings/backtracking for guidance. If you want to abort this run, press Ctrl + C.

When removing sdv==1.0.0 this doesn't happen any longer.

pytest==7.2.2
flake8==6.0.0
ipykernel==6.21.3
black==23.*
isort==5.12.0
pre-commit==3.1.1
interrogate==1.5.0
darglint==1.8.1
coverage[toml]==7.2.2
mypy==1.1.1
pylint==2.17.1
twine==4.0.2
keyring
artifacts-keyring
build==0.10.0
pytest-mock==3.10.0
sdv==1.0.0

Steps to reproduce

pip install -r requirements.txt

with requirements.txt being:

pytest==7.2.2
flake8==6.0.0
ipykernel==6.21.3
black==23.*
isort==5.12.0
pre-commit==3.1.1
interrogate==1.5.0
darglint==1.8.1
coverage[toml]==7.2.2
mypy==1.1.1
pylint==2.17.1
twine==4.0.2
keyring
artifacts-keyring
build==0.10.0
pytest-mock==3.10.0
sdv==1.0.0
@sTomerG sTomerG added bug Something isn't working new Automatic label applied to new issues labels Mar 30, 2023
@npatki
Copy link
Contributor

npatki commented Mar 30, 2023

Hi @sTomerG, I'm curious where the requirements.txt is coming from. Are you using SDV in another package?

When I replicate this, my pip is providing a more descriptive error:

The conflict is caused by:
    pytest 7.2.2 depends on packaging
    ipykernel 6.21.3 depends on packaging
    black 23.1.0 depends on packaging>=22.0
    build 0.10.0 depends on packaging>=19.0
    ctgan 0.7.1 depends on packaging<22 and >=20

The ctgan library is part of the SDV ecosystem and the packaging library was added in the latest version, I think to support Python 3.9. I'm not too sure of the details but as next steps I'd suggest:

  1. Would you be able to use a different version of the black library that is compatible with packaging<22 and >=20?, also
  2. Would you be able to file an issue in the CTGAN library in order to investigate why there is an upper-bound of packaging<22?

@npatki npatki added maintenance Tasks related to infrastructure & dependencies under discussion Issue is currently being discussed and removed bug Something isn't working new Automatic label applied to new issues labels Mar 30, 2023
@sTomerG
Copy link
Author

sTomerG commented Mar 30, 2023

Hi @npatki,

I'm building my own package!

Your error is much more useful indeed, decreasing black to 22.* has solved the issue :). Not sure why my pip is just stuck forever, I'm using 23.0.1 (latest stable version)

@npatki
Copy link
Contributor

npatki commented Mar 30, 2023

Glad that resolved it! I filed a new issue in CTGAN to understand the requirements for packaging. We can use that issue to investigate this upper bound.

In the meantime, I'll close off this issue since we were able to resolve it and it's not directly related to the SDV library.

Edit: I am using the latest pip as well, but I am also using conda for managing my environments. Maybe that is the difference.

@npatki npatki closed this as completed Mar 30, 2023
@npatki npatki added resolution:duplicate This issue or pull request already exists and removed under discussion Issue is currently being discussed labels Apr 10, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
maintenance Tasks related to infrastructure & dependencies resolution:duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants