creamy-ghost-8929
07/20/2022, 8:19 PMhydra-core==1.2.0
on the requirements.txt
on the root of the repo.
It is defined as a target with, on the root BUILD file:
python_requirements(
name="reqs",
source="requirements.txt",
)
On a package, I am using the hydra library, import hydra
but I get ModuleNotFoundError: No module named 'hydra'
when testing the code (./pants test semantic_segmentation:
), before the hydra import, many other libraries specified on the requirements.txt are imported and the work normally. Cannot figure out what the issue might be.bitter-ability-32190
07/20/2022, 8:26 PMbitter-ability-32190
07/20/2022, 8:26 PMmodule_mapping
happy-kitchen-89482
07/20/2022, 8:49 PMhappy-kitchen-89482
07/20/2022, 8:49 PMhappy-kitchen-89482
07/20/2022, 8:49 PMbitter-ability-32190
07/20/2022, 8:50 PMcreamy-ghost-8929
07/20/2022, 9:00 PMpython_requirements(
name="reqs",
source="requirements.txt",
module_mapping={"hydra-core": ["hydra"]},
)
But I got the following error:
If I remove the field module_mapping={"hydra-core": ["hydra"]},
, it works, but yields the import error.
20:53:08.67 [ERROR] 1 Exception encountered:
ProcessExecutionFailure: Process 'Building requirements.pex with 14 requirements: Pillow==9.1.1, PyYAML==6.0, albumentations==1.2.1, boto3==1.23.8, clearml==1.3.2, click==8.1.3, hydra-core==1.2.0, matplotlib==3.5.0, numpy==1.21.4, opencv-python==4.5.5.64, pytorch_lightning==1.6.5, scipy==1.7.2, torch==1.11.0, tqdm==4.62.3' failed with exit code 1.
stdout:
stderr:
pid 22282 -> /home/ubuntu/.cache/pants/named_caches/pex_root/venvs/d65c7684c0aaba6c1b5815e3964acf5250cf53e0/3a90ad1b0750f7c251fd496e695a64af32555d46/pex --disable-pip-version-check --no-python-version-warning --exists-action a --isolated -q --cache-dir /home/ubuntu/.cache/pants/named_caches/pex_root --log /tmp/process-executionCNhUCW/.tmp/pex-pip-logf7jemqgu/pip.log download --dest /tmp/process-executionCNhUCW/.tmp/tmpcbqtbuvu/home.ubuntu.anaconda3.envs.pants.bin.python3.9 Pillow==9.1.1 PyYAML==6.0 albumentations==1.2.1 boto3==1.23.8 clearml==1.3.2 click==8.1.3 hydra-core==1.2.0 matplotlib==3.5.0 numpy==1.21.4 opencv-python==4.5.5.64 pytorch_lightning==1.6.5 scipy==1.7.2 torch==1.11.0 tqdm==4.62.3 --index-url <https://pypi.org/simple/> --retries 5 --timeout 15 exited with -9 and STDERR:
None
bitter-ability-32190
07/20/2022, 9:32 PMhappy-kitchen-89482
07/20/2022, 10:00 PMbitter-ability-32190
07/20/2022, 10:03 PM