You could install the Debian package using ignore_failure true. Then you can install the pip package only if the Debian package is not installed at this point. This could look something like this:
package node[:bact][:application_name] do
ignore_failure true
end
# Resource available from the opscode python cookbook
python_pip node[:bact][:application_name] do
# Install the pip package only if the debian package is not installed
not_if "dpkg-query -W '#{node[:bact][:application_name]}'"
end