Skip to content

Print pip install package errors without breaking, also show progress bar #34

@shouples

Description

@shouples

Passing a list of packages to ipydeps.pip() currently breaks if any package fails to import, rather than continue to attempt installing all available packages in the list.

Suggesting iterating through package names in _run_get_stderr passed through cmd to keep track of which raise exceptions, then return those as a dictionary of {package : (returncode, err)} pairs. From there, update completion output to indicate which new packages were installed and which errored.

Running pip to install bad_package_name_here, geopandas, other_broken_package_there

New packages installed: geopandas

Unable to install the following packages: bad_package_name_here, other_broken_package_there

Could not find a version that satisfies the requirement other_broken_package_there (from versions: )
No matching distribution found for other_broken_package_there

Could not find a version that satisfies the requirement bad_package_name_here (from versions: )
No matching distribution found for bad_package_name_here

Done

Also, feature request -- tqdm progress bar may be useful for longer lists of packages to install.

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