{"action":"opened","issue":{"url":"https://api.github.com/repos/poise/poise-python/issues/32","labels_url":"https://api.github.com/repos/poise/poise-python/issues/32/labels{/name}","comments_url":"https://api.github.com/repos/poise/poise-python/issues/32/comments","events_url":"https://api.github.com/repos/poise/poise-python/issues/32/events","html_url":"https://github.com/poise/poise-python/issues/32","id":127923833,"number":32,"title":"python_package fails to recognize that a package is already installed","user":{"login":"therobot","id":16634,"avatar_url":"https://avatars.githubusercontent.com/u/16634?v=3","gravatar_id":"","url":"https://api.github.com/users/therobot","html_url":"https://github.com/therobot","followers_url":"https://api.github.com/users/therobot/followers","following_url":"https://api.github.com/users/therobot/following{/other_user}","gists_url":"https://api.github.com/users/therobot/gists{/gist_id}","starred_url":"https://api.github.com/users/therobot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/therobot/subscriptions","organizations_url":"https://api.github.com/users/therobot/orgs","repos_url":"https://api.github.com/users/therobot/repos","events_url":"https://api.github.com/users/therobot/events{/privacy}","received_events_url":"https://api.github.com/users/therobot/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-01-21T13:25:41Z","updated_at":"2016-01-21T13:25:41Z","closed_at":null,"body":"Hello,\r\n\r\nI'm trying to install several packages using the python_package resource as follow:\r\n\r\n```\r\npip_dependencies = %w(\r\n  argparse\r\n  boto\r\n  gevent\r\n  six\r\n)\r\n\r\npython_runtime '2' do\r\n  pip_version '8.0.0'\r\nend\r\n\r\npip_dependencies.each do |pip|\r\n  python_package pip do\r\n    action :install\r\n    python '2'\r\n  end\r\nend\r\n```\r\n\r\nThen chef-run breaks with:\r\n\r\n```\r\n  * python_runtime[2] action install\r\n    * poise_languages_system[python2.7] action install\r\n       (up to date)\r\n     (up to date)\r\n  * python_runtime_pip[2] action install[2016-01-21T12:27:30+00:00] WARN: pip does not support bootstrapping a specific version, see https://github.com/pypa/pip/issues/1087.\r\n\r\n\r\n  * python_package[setuptools] action install (up to date)\r\n  * python_package[wheel] action install\r\n    * No candidate version available for wheel\r\n    ================================================================================\r\n    Error executing action `install` on resource 'python_package[wheel]'\r\n    ================================================================================\r\n\r\n    Chef::Exceptions::Package\r\n    -------------------------\r\n    No candidate version available for wheel\r\n\r\n    Cookbook Trace:\r\n    ---------------\r\n    /var/chef/cache/cookbooks/poise/files/halite_gem/poise/helpers/notifying_block.rb:69:in `notifying_block'\r\n    /var/chef/cache/cookbooks/poise-python/files/halite_gem/poise_python/python_providers/base.rb:49:in `action_install'\r\n\r\n    Resource Declaration:\r\n    ---------------------\r\n    # In /var/chef/cache/cookbooks/poise-python/files/halite_gem/poise_python/python_providers/base.rb\r\n\r\n    151:         python_package 'wheel' do\r\n    152:           parent_python new_resource\r\n    153:           version wheel_version if wheel_version.is_a?(String)\r\n    154:         end\r\n    155:       end\r\n\r\n    Compiled Resource:\r\n    ------------------\r\n    # Declared in /var/chef/cache/cookbooks/poise-python/files/halite_gem/poise_python/python_providers/base.rb:151:in `install_wheel'\r\n\r\n    python_package(\"wheel\") do\r\n      action [:install]\r\n      retries 0\r\n      retry_delay 2\r\n      default_guard_interpreter :default\r\n      package_name \"wheel\"\r\n      declared_type :python_package\r\n      cookbook_name \"mycookbook-postgres\"\r\n      parent_python python_runtime[2]\r\n    end\r\n\r\n\r\n  ================================================================================\r\n  Error executing action `install` on resource 'python_runtime[2]'\r\n  ================================================================================\r\n\r\n  Chef::Exceptions::Package\r\n  -------------------------\r\n  python_package[wheel] (/var/chef/cache/cookbooks/poise-python/files/halite_gem/poise_python/python_providers/base.rb line 151) had an error: Chef::Exceptions::Package: No candidate version available for wheel\r\n\r\n  Cookbook Trace:\r\n  ---------------\r\n  /var/chef/cache/cookbooks/poise/files/halite_gem/poise/helpers/notifying_block.rb:69:in `notifying_block'\r\n  /var/chef/cache/cookbooks/poise-python/files/halite_gem/poise_python/python_providers/base.rb:49:in `action_install'\r\n\r\n  Resource Declaration:\r\n  ---------------------\r\n  # In /var/chef/cache/cookbooks/mycookbook-postgres/recipes/_backups_common.rb\r\n\r\n   34: python_runtime '2' do\r\n   35:   pip_version '8.0.0'\r\n   36: end\r\n   37:\r\n\r\n  Compiled Resource:\r\n  ------------------\r\n  # Declared in /var/chef/cache/cookbooks/mycookbook-postgres/recipes/_backups_common.rb:34:in `from_file'\r\n\r\n  python_runtime(\"2\") do\r\n    action [:install]\r\n    updated true\r\n    updated_by_last_action true\r\n    retries 0\r\n    retry_delay 2\r\n    default_guard_interpreter :default\r\n    subresources [python_package[argparse], python_package[boto], python_package[gevent], python_package[six], python_package[wal-e], python_runtime_pip[2], python_package[setuptools], python_package[wheel], python_package[virtualenv]]\r\n    declared_type :python_runtime\r\n    cookbook_name \"mycookbook-postgres\"\r\n    recipe_name \"_backups_common\"\r\n    pip_version \"8.0.0\"\r\n    setuptools_version true\r\n    version \"2\"\r\n    virtualenv_version true\r\n    wheel_version true\r\n  end\r\n```\r\n\r\nThe underlying platform is Ubuntu 14.04 and I'm running chef-client 12.5.1. Even if I install all the packages manually with pip, subsequent chef runs fail with the same error. I can also list the packages with pip, but chef is not able to install them. \r\n\r\nGiven my limited tests and knowledge about the python environment my conclusion is that is more a bug in this cookbook than anything else. I'd love to be proven wrong (getting a solution would be wonderful).\r\n\r\nThanks.\r\n"}}