The best way to handle python dependancy within a plugin?

I'm developing a pycharm plugin that uses a python module. I was looking for a way to get this module installed with the plugin.
So far whenever I run actions of the plugin I check if the module is installed (--version) and run pip to try to install it. I do it by launching external commands on user environment.
It works, but what if pip is not installed, what if user has a mess in PATH, etc.
Is there a better way to pack the module into the plugin? requirements.txt - like? Or other plugin dependency handlers that potentially can be used in other Jetbrains IDEs as well?

Please sign in to leave a comment.