Hi team, from time to time, when I run `./pants ch...
# general
g
Hi team, from time to time, when I run
./pants check
command, mypy is complaining error from third-party library. Below is an example. Sometimes it goes away after re-running the command or cleaning the cache. It is annoying, any insight or suggestion?
Copy code
[2023-01-02T16:05:59.896Z] .cache/pex_root/venvs/0cbc48e25cc767e871f34f3472936b3851b41d9c/bf77cd40798e75deda6009f40e4c437c9e3474cf/lib/python3.9/site-packages/torch/fx/experimental/symbolic_shapes.py:14:1: error: Cannot find implementation or library stub for module named "sympy"  [import]
[2023-01-02T16:05:59.896Z]         import sympy  # type: ignore[import]
[2023-01-02T16:05:59.896Z]     ^
[2023-01-02T16:05:59.896Z] test/unit/atom_fm/fm/pipeline/data/test_create_coarse_features_dataset.py:6: note: In module imported here:
[2023-01-02T16:05:59.897Z] .cache/pex_root/venvs/0cbc48e25cc767e871f34f3472936b3851b41d9c/bf77cd40798e75deda6009f40e4c437c9e3474cf/lib/python3.9/site-packages/xarray/__init__.py:43:1: error: Cannot find implementation or library stub for module named "importlib_metadata"  [import]
[2023-01-02T16:05:59.897Z]         from importlib_metadata import version as _version  # type: ignore[no-redef]
[2023-01-02T16:05:59.897Z]     ^
any advice for this question?
c
this sounds like the same issue we’ve seen in the Pants code base as well wrgt missing
pkg_resources
at times when running
check
on a subset of targets.. (usually when using
--changed-since
)
g
bingo! I do use
--change-since
what exactly I should do?
c
we’ll have to look into what’s causing this, for myself I simply re-run and hope for the best 🤞 annoyingly..
g
😄 the same here. maybe I should not use
--changed-since
for check for now?
c
for me the benefit of changed since outweigh the relatively rare re-run I have to do 😉
g
even with the cache I assume?