Comments (5)
Could you include full file contents, not just parts of them?
from pip-tools.
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.
Does using --upgrade
help?
from pip-tools.
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)
- [TODO][CI] Add macOS 14 ARM 64 to the matrix
- Research ways to support verifying the PEP 740 digital attestations early
- Output --no-binary and --only-binary options to preserve pip behavior HOT 4
- pip-compile is taking forever for python3.13 HOT 4
- Make it possible to avoid yanked versions of packages in the compiled requirements HOT 2
- Use src-layout instead of flat-layout HOT 4
- pip-sync should respect pip-compile's output_file configuration HOT 1
- pip-compile should not generate a command with --output-file if the output file matches the configuration HOT 2
- Config file discovery doesn't work as intended HOT 1
- Mm
- Consider downstream python version pins when generating requirements.txt HOT 1
- Allow `pip-sync` to remove `pip-tools` when `--python-executable` is specified HOT 5
- Test failure: `pip freeze` no longer protects `setuptools`, `distribute` or `wheel` on Python 3.12+ HOT 7
- Error when supplying an existing file `ModuleNotFoundError: No module named 'setuptools.extern.six'` HOT 2
- Recursive extra dependencies compiles wrong requirements.txt HOT 1
- Create another PyPI release HOT 1
- `pip-sync --python-executable` evaluates markers for the wrong environment
- Poor interaction between isolated mode and `--python-executable` HOT 2
- "TypeError: cannot use a string pattern on a bytes-like object" while installing django-geojson HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pip-tools.