rough-book-52790
03/13/2024, 6:39 PMModuleNotFoundError: No module named 'google'
. Does anyone know anything about that? I've setup a simple project demonstrating the issue:
> tree
.
├── BUILD # only contains `python_requirements(name="root")`
├── pants.toml # only backend enabled is `pants.backend.python`
├── requirements.txt # only contains `cloud-sql-python-connector`
└── src
├── BUILD # only contains `python_tests(name = "tests")`
└── some_test.py # only contains `from google.cloud.sql.connector import Connector, IPTypes`
1 directory, 5 files
The python_requirement target seems to have been setup:
> pants --filter-target-type=python_requirement list ::
//:root#cloud-sql-python-connector
I've sifted through the sandbox (obtained from pants --keep-sandboxes=on_failure test ::
) and don't see anything related to the google sql python connector anywhere, requirements.pex/.deps doesn't exist. I'm using pants version 2.17.1.refined-addition-53644
03/13/2024, 6:57 PMrough-book-52790
03/13/2024, 7:03 PMrefined-addition-53644
03/13/2024, 7:06 PMimport google.<not-cloud>.<not-sql>
broad-processor-92400
03/13/2024, 8:28 PMrough-book-52790
03/13/2024, 8:32 PMbroad-processor-92400
03/13/2024, 9:06 PMGoogle-…
pattern, sorry about that.
If you felt like it, a pull request to https://github.com/pantsbuild/pants/blob/main/src/python/pants/backend/python/dependency_inference/default_module_mapping.py to add the PyPI name -> import name mapping to DEFAULT_MODULE_MAPPING
would be nice