Not an expert in Python plugins, but I asked chatgpt gpt-4 about this, and this is what it came up with -
https://chat.openai.com/share/e1ad569f-4d4d-4057-8564-0d79a8... . See if this helps.
Essentially boils down to this:
Best Practices
The correct approach to managing dependencies will depend on the specifics of your application and its plugins. However, here are some general best practices:
Document your dependencies: Make sure to provide clear documentation of all dependencies required for your plugin to function properly.
Specify dependency versions: When downloading dependencies during installation, always specify the version to ensure the plugin works as expected.
Regularly update your dependencies: Whether you bundle them with your plugin or download them during installation, make sure you regularly update your dependencies to patch any security vulnerabilities and benefit from new features or improvements.
Consider using virtual environments: To prevent conflicts between different plugins' dependencies, consider using Python's virtual environments. This isolates each plugin's dependencies in its own environment.
Leverage dependency management tools: Tools like Pipenv, Poetry, or conda can help you manage your dependencies effectively. These tools also support the creation of virtual environments.