ImportError: cannot import name 'LegacyVersion' from 'packaging.version'
DragosChirila opened this issue · 1 comments
DragosChirila commented
- safety version: 2.3.3 (or 2.3.1 , it doesn't matter because of this
packaging>=21.0
) - Python version: 3.10
- Operating System: Ubuntu
Description
Half an hour ago it was released packaging-22.0 and
Remove LegacySpecifier and LegacyVersion (:issue:`407`)
What I Did
$ safety check --full-report --output text |& tee -a vulnerability-scan-results-$CI_COMMIT_SHORT_SHA.txt
Traceback (most recent call last):
File "/usr/local/bin/safety", line 5, in <module>
from safety.cli import cli
File "/usr/local/lib/python3.10/site-packages/safety/cli.py", line 12, in <module>
from safety import safety
File "/usr/local/lib/python3.10/site-packages/safety/safety.py", line 14, in <module>
from packaging.version import parse as parse_version, Version, LegacyVersion, parse
ImportError: cannot import name 'LegacyVersion' from 'packaging.version' (/usr/local/lib/python3.10/site-packages/packaging/version.py)
DragosChirila commented
Duplicates #437