Giter Site home page Giter Site logo

Comments (5)

webknjaz avatar webknjaz commented on August 20, 2024

Could you include full file contents, not just parts of them?

from pip-tools.

ianrandman avatar ianrandman commented on August 20, 2024

Could you include full file contents, not just parts of them?

$ rm -f requirements.in requirements.txt 

$ echo $'torch==2.2.2\ntorchvision' > requirements.in

$ pip-compile -q
WARNING: --strip-extras is becoming the default in version 8.0.0. To silence this warning, either use --strip-extras to opt into the new default or use --no-strip-extras to retain the existing behavior.

$ cat requirements.txt
#
# This file is autogenerated by pip-compile with Python 3.10
# by the following command:
#
#    pip-compile
#
filelock==3.15.4
    # via torch
fsspec==2024.6.1
    # via torch
jinja2==3.1.4
    # via torch
markupsafe==2.1.5
    # via jinja2
mpmath==1.3.0
    # via sympy
networkx==3.3
    # via torch
numpy==2.0.0
    # via torchvision
pillow==10.4.0
    # via torchvision
sympy==1.13.0
    # via torch
torch==2.2.2
    # via
    #   -r requirements.in
    #   torchvision
torchvision==0.17.2
    # via -r requirements.in
typing-extensions==4.12.2
    # via torch

$ echo $'torch==2.3.1\ntorchvision' > requirements.in

$ pip-compile -q
  ERROR: Cannot install -r requirements.in (line 2) and torch==2.3.1 because these package versions have conflicting dependencies.
...
pip._vendor.resolvelib.resolvers.ResolutionImpossible: [RequirementInformation(requirement=SpecifierRequirement('torch==2.3.1'), parent=None), RequirementInformation(requirement=SpecifierRequirement('torch==2.2.2'), parent=LinkCandidate('https://files.pythonhosted.org/packages/0a/b8/027b3c36e61a26d14d4e9a8413d4a09e5fd8d3e01e3efce78447ca1dc3dd/torchvision-0.17.2-cp310-cp310-win_amd64.whl (from https://pypi.org/simple/torchvision/) (requires-python:>=3.8)'))]
...
pip._internal.exceptions.DistributionNotFound: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts

$ rm requirements.txt 

$ pip-compile -q
WARNING: --strip-extras is becoming the default in version 8.0.0. To silence this warning, either use --strip-extras to opt into the new default or use --no-strip-extras to retain the existing behavior.

$ cat requirements.txt
#
# This file is autogenerated by pip-compile with Python 3.10
# by the following command:
#
#    pip-compile
#
filelock==3.15.4
    # via torch
fsspec==2024.6.1
    # via torch
intel-openmp==2021.4.0
    # via mkl
jinja2==3.1.4
    # via torch
markupsafe==2.1.5
    # via jinja2
mkl==2021.4.0
    # via torch
mpmath==1.3.0
    # via sympy
networkx==3.3
    # via torch
numpy==2.0.0
    # via torchvision
pillow==10.4.0
    # via torchvision
sympy==1.13.0
    # via torch
tbb==2021.13.0
    # via mkl
torch==2.3.1
    # via
    #   -r requirements.in
    #   torchvision
torchvision==0.18.1
    # via -r requirements.in
typing-extensions==4.12.2
    # via torch

from pip-tools.

webknjaz avatar webknjaz commented on August 20, 2024

Does using --upgrade help?

from pip-tools.

ianrandman avatar ianrandman commented on August 20, 2024

Does using --upgrade help?

Yes, but I do not want to upgrade packages unless necessary. My understanding is the same as in #1977 (comment). My intention is to maintain existing constraints when possible and only drop them if need be, which I believe is the intended behavior of pip-compile without --upgrade.

from pip-tools.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.