Skip to content

pip should respect /usr/local #5722

Description

@FFY00

What's the problem this feature will solve?

pip breaking system dependencies on Linux. Right now, users who want to respect the os dependencies need to install packages as user or need to use separated environments. This is obviously not optimal. We should be able to run pip without breaking the system out of the box.

Describe the solution you'd like

The solution is quite simple, just make pip respect /usr/local. pip shouldn't touch /usr/lib since that directory is supposed to be used by the distribution. pip should install its packages to /usr/local/lib.

However, I don't know what would be the best way to add /usr/local/lib/... to the PYTHONPATH. I think there's a section in python config that allows us to do that. If not, we could try to submit a PEP.

Alternative Solutions
As I mentioned before, those would be installing as user (--user) or using a pyenv.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions