rapid-flag-11972
01/04/2022, 4:57 PMtorch=1.10.1
fsspec=0.8.7
pytorch_lightning=1.2.7
torchmetrics=0.3.2
hypothesis=6.30.1
matplotlib=3.5.0
While upgrading pytorch_lightning (to 1.5.0) and torchmetrics (0.6.0) we had dependency conflicts due to fsspec (2021.11.1) . When trying to import torch and running it through pants we got a “No module named pkg_resources found” error. We however were able to import torch on a virtualenv with the same exact modules installed without any error.
_______ ERROR collecting file/path/test.py ________
ImportError while importing test module '/tmp/process-execution9BggO8/file/path/test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/home/shreyas/.pyenv/versions/3.7.12/lib/python3.7/importlib/__init__.py:127: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
file/path/test.py:4: in <module>
import torch
/home/shreyas/.cache/pants/named_caches/pex_root/venvs/short/8b6cc6fb/lib/python3.7/site-packages/torch/__init__.py:29: in <module>
from .torch_version import __version__ as __version__
/home/shreyas/.cache/pants/named_caches/pex_root/venvs/short/8b6cc6fb/lib/python3.7/site-packages/torch/torch_version.py:3: in <module>
from pkg_resources import packaging # type: ignore[attr-defined]
E ModuleNotFoundError: No module named 'pkg_resources'
enough-analyst-54434
01/04/2022, 5:06 PMrapid-flag-11972
01/04/2022, 5:11 PMhundreds-father-404
01/04/2022, 6:24 PMrapid-flag-11972
01/05/2022, 6:46 AMhundreds-father-404
01/05/2022, 6:51 AMdependencies
set manually. (Target was formerly called python_requirement_library)rapid-flag-11972
01/05/2022, 6:59 AMorange-beach-75711
01/05/2022, 8:32 PMoverrides
, does it mean that we can leave torch in requirements.txt
?hundreds-father-404
01/05/2022, 8:34 PMpython_requirement
target gets generated from the requirements.txt
orange-beach-75711
01/05/2022, 8:36 PMhundreds-father-404
01/05/2022, 8:38 PMupdate-build-files
to automate some of it
also the release blogs if you haven't yet seen them https://blog.pantsbuild.orgorange-beach-75711
01/05/2022, 8:38 PMorange-beach-75711
01/05/2022, 8:38 PM