catalyst icon indicating copy to clipboard operation
catalyst copied to clipboard

Dependency `packaging` not specified — ModuleNotFoundError

Open lainisourgod opened this issue 2 years ago • 2 comments

🐛 Bug Report

Hi!

Catalyst uses dependency packaging here but does not specify it directly in any of dependency files.

When installing catalyst via poetry poetry add catalyst, packaging dependency isn't installed. This bug is silent most of the times because some other packages as jupyter install packaging, but in my env this bug there is none of these packages.

How To Reproduce

Steps to reproduce the behavior:

  1. mkdir test-proj && cd test-proj
  2. Create pyproject.toml with catalyst being the only dependency
[tool.poetry]
name = "test-proj"
version = "0.1.0"
description = ""
authors = ["Your Name <[email protected]>"]

[tool.poetry.dependencies]
python = "^3.7"
catalyst = "^22.4"

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
  1. Create main.py
mkdir test_proj && touch test_proj/main.py && cat "import catalyst" > test_proj/main.py
  1. Get error message
❯ poetry run python test_proj/main.py 
Traceback (most recent call last):
  File "test_proj/main.py", line 1, in <module>
    import catalyst
  File "/home/user/.cache/pypoetry/virtualenvs/test_proj-vU8Qtjuj-py3.7/lib/python3.7/site-packages/catalyst/__init__.py", line 12, in <module>
    from catalyst.settings import SETTINGS
  File "/home/user/.cache/pypoetry/virtualenvs/test_proj-vU8Qtjuj-py3.7/lib/python3.7/site-packages/catalyst/settings.py", line 6, in <module>
    from packaging.version import Version
ModuleNotFoundError: No module named 'packaging'

Expected behavior

Environment

Catalyst version: 22.04
PyTorch version: 1.11.0+cu102
Python version: 3.7

Checklist

  • [ ] bug description
  • [ ] steps to reproduce
  • [ ] expected behavior
  • [ ] environment
  • [ ] code sample / screenshots

FAQ

Please review the FAQ before submitting an issue:

lainisourgod avatar Jun 15 '22 17:06 lainisourgod

🤔 Nice catch, could you please submit a PR with updated requirements?

Scitator avatar Jun 19 '22 15:06 Scitator

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Sep 20 '22 21:09 stale[bot]