Pip provider fails on RedHat osfamily when pip not installed via RPM (Could not locate the pip command)

50 views
Skip to first unread message

Michael O'Dea

unread,
Jun 19, 2013, 10:13:30 AM6/19/13
to puppet...@googlegroups.com
In resolving bug 15980, the pip package provider was changed to recognize the RedHat osfamily fact and use the executable name "pip-python" in those environments.  This does not take into account environments where pip has been installed via easy_install or by custom rpm providers.  In those environments (such as mine) this osfamily change breaks the pip provider, requiring as a workaround that the administrator create a softlink to pip-python before any pip packages are referenced.

It seems to me that the change could have been accomplished by trying the pip-python alias if the normal exe name failed, rather than assuming that the weird way that one common RPM names pip is a global circumstance.  

Obviously I already discovered the workaround and the problem, so I suppose I'm just posting this in the hopes that it shows up in a Google search for the next guy.  Thanks.

--
M

Dafydd James

unread,
Feb 2, 2015, 3:16:14 PM2/2/15
to puppet...@googlegroups.com
Thank you! This really helped.

sudo ln -s /usr/bin/pip /usr/bin/python-pip

Or in puppet format:

    file { '/usr/bin/pip-python':
        ensure  => link,
        target  => '/usr/bin/pip',
        require => Package['python-pip']
    }

Reply all
Reply to author
Forward
0 new messages