PyPackageManager deprecation

Answered

Hello,

I'm working on a MicroPython plugin for PyCharm (and soon CLion). I want to add functionality using some pip libraries. I would like to be able to check if the current interpreter has the required libraries installed, and then prompt the user with a button to automatically download them if they are missing.

I've been searching through the api and so far I've only been able to find this PyPackageManager.getInstance().packages. Now apparently this is deprecated and marked for removal. Is the removal planned for any of the early 2025 IDE builds? And is there some new replacement API or a different way to interact with the installed python packages from the plugin?

For actually handling the installation I've been using PyPackageManagerUI().install(), which isn't deprecated itself, but it seems to be using the deprecated PyPackageManager under the hood

0
1 comment

Hi Lukas,

The new replacement is com.jetbrains.python.packaging.management.PythonPackageManager.

Regarding using PyPackageManagerUI, don't worry about deprecated APIs used in the implementation details. As long as you don't use them directly, it shouldn't affect you.

0

Please sign in to leave a comment.