Can I add support for a third-party Python package manager?

Hey, I’d like to write a PyCharm CE plugin that provides support for a package manager that can be used to manage Python and dependencies using virtual environments and custom config/lock files.

My first attempt was to extend the list of Python interpreter types which is shown in the new project wizard and the add interpreter dialog. However, from what I gathered, this list is hard-coded and cannot be extended. I also tried implementing SdkProvider and SdkFlavor but I wasn’t able to make the user able to select the Python interpreter provided by the package manager.

My second attempt was to extend the new project wizard with a module type for projects managed by the package manager. However, the documentation on this topic seems to use deprecated classes, and I wasn’t able to figure out how to do that properly.

I’d be very grateful if someone could point me in the right direction, or confirm that this is indeed not possible. After many hours of trial and error and reading other plugins’ source codes I am out of ideas tbh.

The list is indeed non-extendable. I got this problem myself, and had to create an entire new panel to workaround it.

Some of the things I used no longer exist on 2024.3.2 and 2025.1, and JetBrains won’t add proper package manager APIs anytime soon.

Out of curiosity, what is the package manager in question?

I have actually already inspected your plugin (among others) beforehand and also found the linked issue. I have also noticed that you have removed the entire SDK logic from your plugin, since PyCharm now includes support for uv out of the box.

Unfortunately, I feel like there is not really an interface (anymore) that allows third-party package managers to be integrated reasonably. :confused:

Pixi

Partly, yes, but also because of the removal of the APIs. I just got an issue asking for them back.

That’s the way it is, unfortunately. You will probably have to deal with this the hard way by recreating everything from scratch using directoryProjectGenerator and friends.

From what I can tell, this does not allow the package installation to be delegated to a custom package manager. This would actually be a central feature on which the entire usefulness of my plugin depends.