Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cloudcli::_aws_linux fails on setuptools install on ubuntu 16.04 #29

Open
nergdron opened this issue Dec 13, 2018 · 2 comments
Open

cloudcli::_aws_linux fails on setuptools install on ubuntu 16.04 #29

nergdron opened this issue Dec 13, 2018 · 2 comments

Comments

@nergdron
Copy link

This used to work, and I haven't touched the codebase in a while. but today, running with kitchenci to test in a fresh Ubuntu 16.04 VM, this part of the cookbook fails when attempting to install python setuptools.

       Recipe: cloudcli::_aws_linux
         * python_runtime[2] action install
           * poise_languages_system[python2.7] action install
             - install version 2.7.12-1ubuntu0~16.04.4 of package python2.7-dev
           * apt_package[python2.7, python2.7-dev] action nothing (skipped due to action :nothing)
         
         * python_runtime_pip[2] action install
           - Bootstrapping pip latest from https://bootstrap.pypa.io/get-pip.py
         * python_package[setuptools] action install
           
           ================================================================================
           Error executing action `install` on resource 'python_package[setuptools]'
           ================================================================================
           
           Mixlib::ShellOut::ShellCommandFailed
           ------------------------------------
           Expected process to exit with [0], but received '1'
           ---- Begin output of ["/usr/bin/python2.7", "-", "setuptools"] ----
           STDOUT: 
           STDERR: No handlers could be found for logger "pip._internal.download"
           Traceback (most recent call last):
             File "<stdin>", line 42, in <module>
           AttributeError: type object 'InstallRequirement' has no attribute 'from_line'
           ---- End output of ["/usr/bin/python2.7", "-", "setuptools"] ----
           Ran ["/usr/bin/python2.7", "-", "setuptools"] returned 1
           
           Cookbook Trace:
           ---------------
           /tmp/kitchen/cache/cookbooks/poise-languages/files/halite_gem/poise_languages/command/mixin.rb:207:in `tap'
           /tmp/kitchen/cache/cookbooks/poise-languages/files/halite_gem/poise_languages/command/mixin.rb:207:in `language_command_shell_out!'
           /tmp/kitchen/cache/cookbooks/poise-languages/files/halite_gem/poise_languages/command/mixin.rb:222:in `block in language_command_mixin'
           /tmp/kitchen/cache/cookbooks/poise-python/files/halite_gem/poise_python/resources/python_package.rb:329:in `pip_command'
           /tmp/kitchen/cache/cookbooks/poise-python/files/halite_gem/poise_python/resources/python_package.rb:353:in `pip_outdated'
           /tmp/kitchen/cache/cookbooks/poise-python/files/halite_gem/poise_python/resources/python_package.rb:221:in `check_package_versions'
           /tmp/kitchen/cache/cookbooks/poise-python/files/halite_gem/poise_python/resources/python_package.rb:200:in `load_current_resource'
           /tmp/kitchen/cache/cookbooks/poise/files/halite_gem/poise/helpers/notifying_block.rb:69:in `notifying_block'
           /tmp/kitchen/cache/cookbooks/poise-python/files/halite_gem/poise_python/python_providers/base.rb:50:in `action_install'
           
           Resource Declaration:
           ---------------------
           # In /tmp/kitchen/cache/cookbooks/poise-python/files/halite_gem/poise_python/python_providers/base.rb
           
           138:         python_package 'setuptools' do
           139:           parent_python new_resource
           140:           version setuptools_version if setuptools_version.is_a?(String)
           141:         end
           142:       end
           
           Compiled Resource:
           ------------------
           # Declared in /tmp/kitchen/cache/cookbooks/poise-python/files/halite_gem/poise_python/python_providers/base.rb:138:in `install_setuptools'
           
           python_package("setuptools") do
             package_name "setuptools"
             action [:install]
             default_guard_interpreter :default
             declared_type :python_package
             cookbook_name "cloudcli"
             parent_python python_runtime[2]
             timeout 900
           end
           
           System Info:
           ------------
           chef_version=13.8.5
           platform=ubuntu
           platform_version=16.04
           ruby=ruby 2.4.3p205 (2017-12-14 revision 61247) [x86_64-linux]
           program_name=chef-client worker: ppid=2828;start=00:37:34;
           executable=/opt/chef/bin/chef-client
@fortman
Copy link

fortman commented Feb 12, 2019

Interesting, I'm getting the same error with 18.04. I swear I'm including this in other cookbooks as well and it is working. If I can figure out what my issue is, I'll provide an update.

@sandnabba
Copy link

Hello,

I did just have the same issue, and I believe that this is probably the root cause:
poise/poise-python#140

I solved it by downgrading pip to pip==18.0, and then I added the node.default options before including the cloudcli cookbook:

node.default['poise-python']['options']['pip_version'] = '18.0'
include_recipe 'cloudcli'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants