'Module not found error from imported package

We are using an internally developed package apv_core that depends on the ezdzx package. This packaged is build with setup.py bdist_wheel and then deployed to other applications in the solution.

When importing this package I get this error:

./.venv/lib/python3.9/site-packages/apv_core/cad/dxf.py:3: in <module>
    import ezdxf
E   ModuleNotFoundError: No module named 'ezdxf'

This suggests that the dependancy is not available in apv_core. I rebuilt it ensuring the package is included. All unit tests in apv_core that depends on ezdxf passes. The requirements.txt is also correctly updated.

I can install ezdxf in the target application where apv_core is imported but this does not feel right. My assumption is that all dependancies are included in the wheel that is built and deployed. Is this not correct?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source