<#21445 Python 3rdParty Dependency not Resolving C...
# github-notifications
c
#21445 Python 3rdParty Dependency not Resolving Correctly New discussion created by philnugent I am trying to add
azure-appconfiguration-provider
library as a third party dependency to my project. When I execute the run goal to run the application, I have no problems. When I run package to build a pex package, I get the error
ModuleNotFoundError: No module named 'azure.appconfiguration.provider'
. The library includes a transitive dependency named
azure-appconfiguration
- my guess is that this transitive dependency is keeping the primary dependency from resolving. I'm new to Pants and Pex, so I'm not sure where this could be happening. I've tried explicitly mapping the module to ensure it is included. Is there any way to explicitly ensure a dependency is included in the Pex package? I'm at a loss for how to resolve this. My relevant configuration is below and am using Pants version
2.21.1
. If anyone can shed some light on what could be going on or how to resolve this, I would be eternally grateful. src/3rdparty/requirements.txt
Copy code
...
azure-appconfiguration-provider==1.3.0
azure-appconfiguration==1.7.1
...
src/3rdparty/BUILD
Copy code
python_requirements(
    module_mapping={
        "azure-appconfiguration-provider": ["azure.appconfiguration.provider"],
    },
)
src/application/BUILD
Copy code
python_sources(
    name="application",
    sources=["*.py"],
)

pex_binary(
    name="local-binary",
    entry_point="application.py",
    dependencies=[
        "src/3rdparty#azure-appconfiguration-provider",
    ],
)
pantsbuild/pants