question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

version check with suffix incorrect?

See original GitHub issue

Description

My requirements.txt and req_torch.txt look like:

$ cat requirements.txt
-c req_torch.txt

# Restore default index URL.
-i https://pypi.org/simple
hydra-core==1.2.0
pytorch-lightning==1.7.7
fairscale==0.4.12
cat req_torch.txt
-i https://download.pytorch.org/whl/torch_stable.html
torch==1.10.2+cu113

But running pip install -r requirements.txt results in this error:

ERROR: Cannot install -r requirements.txt (line 6) because these package versions have conflicting dependencies.

The conflict is caused by:
    pytorch-lightning 1.7.7 depends on torch>=1.9.*
    The user requested (constraint) torch==1.10.2+cu113

Expected behavior

It seems that the above versions should work and error is due to the extra suffix of “+cu113”?

pip version

22.3

Python version

3.9

OS

linux

How to Reproduce

try pip install with above requirements.txt and req_torch.txt.

Output

No response

Code of Conduct

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
uranusjrcommented, Oct 19, 2022

This is caused by the version range specification >=1.9.*, which is undefined according to the specification. I mentioned this a while ago elsewhere but forgot how that discussion went. The * whildcard is only ever intended for == (give me anything that starts with 1.9.); for >= the correct specifier is >=1.9 (give me 1.9 or later). Not sure which is the correct semantic, you’ll need to work this out with the package author.

0reactions
min-xu-aicommented, Oct 19, 2022

@pfmoore, thanks for the help! Yes, indeed after using --find-links, it works!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Incorrect suffix check — CodeQL query help documentation
Incorrect suffix check ¶ ... The indexOf and lastIndexOf methods are sometimes used to check if a substring occurs at a certain position...
Read more >
Support for version suffixes (#16716) - CMake - GitLab
The find_package command (or FPHSA) then should check whether the version schemes match before doing the actual version match. 1.
Read more >
Conflicting cross-version suffixes (sbt, Scala-STM, Play-JSON)
Is there any chance to dig deeper into where these two "conflicting" versions come from? I am quite surprised that play-json should be...
Read more >
C++11: Invalid Suffix on Literal Warning/Error
I recently came across this unexpected error when compiling C++ code using Clang:
Read more >
Windows remembers old DNS suffix - Super User
and check > append parent suffixes of the primary DNS suffix ... scope option that was setting the wrong dns suffix using the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found