Skip to content

Packages with an underscore in package name are never detected as installed. #23

@Peterdoo

Description

@Peterdoo

Pip replaces underscores with dashes. So when the name of a package is for example my_package, pip will display it in the list command as my-package. IsInstalled will not find it and returns false.

I would recommend to make a small change to use dash for pip instead of underscore in PyPackage.Manager.Pip.pas:

constructor TPyPackageManagerPip.Create(const APackageName: TPyPackageName);
begin
inherited;
FDefs := TPyPackageManagerDefsPip.Create(APackageName.Replace('_', '-'));
FCmd := TPyPackageManagerCmdPip.Create(FDefs);
end;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions