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

Failed to resolve dependency while using uv #798

Open
aztecher opened this issue Feb 18, 2025 · 0 comments
Open

Failed to resolve dependency while using uv #798

aztecher opened this issue Feb 18, 2025 · 0 comments
Labels
type/bug An issue about a bug

Comments

@aztecher
Copy link

🐛 Describe the bug

Hi there!
I have found that when I try to setup using uv, it fails to resolve the dependencies.
The error is as follows

Using CPython 3.12.9
Creating virtual environment at: .venv
  × No solution found when resolving dependencies for split (python_full_version == '3.8'):
  ╰─▶ Because the requested Python version (>=3.8) does not satisfy Python>3.8 and
      cached-path>=1.6.2 depends on Python>3.8, we can conclude that cached-path>=1.6.2
      cannot be used.
      And because only the following versions of cached-path are available:
          cached-path<=1.6.2
          cached-path==1.6.3
          cached-path==1.6.4
          cached-path==1.6.5
          cached-path==1.6.6
          cached-path==1.6.7
      we can conclude that cached-path>=1.6.2 cannot be used.
      And because your project depends on cached-path>=1.6.2 and your project requires
      ai2-olmo[all], we can conclude that your project's requirements are unsatisfiable.

      hint: The `requires-python` value (>=3.8) includes Python versions that are not
      supported by your dependencies (e.g., cached-path>=1.6.2 only supports >3.8). Consider
      using a more restrictive `requires-python` value (like >3.8).

This error occurs because the OLMo dependency, cached-path, has requires-python = ">3.8", while OLMo itself has requires-python = ">=3.8".
Therefore, changing OLMo's requires-python to >3.8 will solve the problem (I have confirmed that this change solves the problem in my environment).

If you don't have a strong reason to set requires-python = ">=3.8" in this repository, It would be better to change requires-python = ">3.8".
What do you think of this change? If ok, I will create PR to fix this issue.

Thanks ;)

How to reproduce

  • python: 3.12
  • uv: 0.6.0
uv python install 3.12
uv python pin 3.12
git clone https://github.com/allenai/OLMo.git
cd OLMo
uv sync --extra all

Versions

$ python --version && pip freeze
Python 3.12.0

NOTE: uv creates a new environment with the specified version of Python. So, a specified Python version is displayed and this environment has no packages.

@aztecher aztecher added the type/bug An issue about a bug label Feb 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug An issue about a bug
Projects
None yet
Development

No branches or pull requests

1 participant