0

After running pip3 install -r requirements.txt

# requirements.txt
...

django~=3.1
djangorestframework~=3.12
django-extensions~=3.0
pygraphviz~=1.6
sphinx~=3.3
...

I see the wrong version of django:

pip freeze

django==3.2.5

I suppose one of the packages in requirements.txt has it as dependency

  • How would I find the culprit?
  • How do I prevent it from happening?
jonrsharpe
  • 115,751
  • 26
  • 228
  • 437
ProfHase85
  • 11,763
  • 7
  • 48
  • 66

1 Answers1

3

There is no issue. This is exactly how it should work. django~=3.1 and 3.2.5 don't differ by a major version.

Operator Description Example
~= Any compatible release. Compatible releases are releases that are within the same major or minor version, assuming the package author is using semantic versioning. ~=3.1: version 3.1 or later, but not version 4.0 or later. ~=3.1.2: version 3.1.2 or later, but not version 3.2.0 or later.
deceze
  • 510,633
  • 85
  • 743
  • 889
roganjosh
  • 12,594
  • 4
  • 29
  • 46