[chef] Re: Re: Easy Install Error for Pisa


Chronological Thread 
  • From: Chris Spencer < >
  • To:
  • Subject: [chef] Re: Re: Easy Install Error for Pisa
  • Date: Thu, 21 Apr 2011 12:04:46 -0400
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=sXelQnLeVUcDHDY2/owxcWGKSamDauSFHWh+nbvopDIWan1OqikczOcGJarOQu/VYt wCZ6fts1z6m3UUFSDEHpYJwfpnQpDOE7glsuvmte4We2A8wXZWPXmpmfcCx1IVDY34os 3jMb7v7MY3oo5vrZnrnE6c4aF5fQSQw71AQ8E=

Thanks. I dropped that recipe into my /cookbooks, and I now have this in my default.rb:

python_pip "pisa" do
  version "3.0.33"
  action :install
end

However, now when I try and install, I get the error:

[myhost] err: /usr/lib/ruby/gems/1.8/gems/chef-0.9.12/bin/../lib/chef/provider/package.rb:50:in `action_install': No version specified, and no candidate version available for python26 (Chef::Exceptions::Package)
[myhost] err:     from /usr/lib/ruby/gems/1.8/gems/chef-0.9.12/bin/../lib/chef/resource.rb:395:in `send'
[myhost] err:     from /usr/lib/ruby/gems/1.8/gems/chef-0.9.12/bin/../lib/chef/resource.rb:395:in `run_action'
[myhost] err:     from /usr/lib/ruby/gems/1.8/gems/chef-0.9.12/bin/../lib/chef/runner.rb:53:in `run_action'
[myhost] err:     from /usr/lib/ruby/gems/1.8/gems/chef-0.9.12/bin/../lib/chef/runner.rb:89:in `converge'
[myhost] err:     from /usr/lib/ruby/gems/1.8/gems/chef-0.9.12/bin/../lib/chef/runner.rb:89:in `each'
[myhost] err:     from /usr/lib/ruby/gems/1.8/gems/chef-0.9.12/bin/../lib/chef/runner.rb:89:in `converge'
[myhost] err:     from /usr/lib/ruby/gems/1.8/gems/chef-0.9.12/bin/../lib/chef/resource_collection.rb:94:in `execute_each_resource'
[myhost] err:     from /usr/lib/ruby/gems/1.8/gems/chef-0.9.12/bin/../lib/chef/resource_collection/stepable_iterator.rb:116:in `call'
[myhost] err:      ... 11 levels...
[myhost] err:     from /usr/lib/ruby/gems/1.8/gems/chef-0.9.12/bin/../lib/chef/application.rb:62:in `run'
[myhost] err:     from /usr/lib/ruby/gems/1.8/gems/chef-0.9.12/bin/chef-solo:25
[myhost] err:     from /usr/bin/chef-solo:19:in `load'
[myhost] err:     from /usr/bin/chef-solo:19
[myhost] out: [Thu, 21 Apr 2011 11:57:08 -0400] INFO: Ran execute[generate-module-list] successfully
[myhost] out: [Thu, 21 Apr 2011 11:57:08 -0400] ERROR: package[python26] (/tmp/chef/cookbooks/python/recipes/package.rb:32:in `from_file') had an error:
[myhost] out: No version specified, and no candidate version available for python26

I'm still standardized on Python 2.6.5, and I noticed the Opscode cookbooks seem to assume 2.7. I tried changing default['python']['version'] = '2.6.5' in python/attributes/default.rb, but that had no effect.

What else do I have to do to install support for python_pip?

Regards,
Chris

On Wed, Apr 20, 2011 at 10:04 PM, Noah Kantrowitz < "> > wrote:
Use the pip_install LWRP in the Python cookbook. It shouldn't have this issue, plus pip >>> easy_install :-)

--Noah


On Apr 20, 2011, at 6:36 PM, Chris Spencer wrote:

Hi,

I'm new to Chef, and I'm trying to automate the installation of the Python package "pisa". I was hoping to use the "easy_install_package" function, which I'm using like:

easy_install_package "pisa" do
   version "3.0.27"
end

but this throws the error:

[myhost] err: /usr/lib/ruby/gems/1.8/gems/chef-0.9.12/bin/../lib/chef/shell_out.rb:232:in `invalid!': Expected process to exit 0, but it exited with 1 (Chef::Exceptions::ShellCommandFailed)
[myhost] err: ---- Begin output of python -c "import pisa; print pisa.__path__" ----
[myhost] err: STDOUT:
[myhost] err: STDERR: Traceback (most recent call last):
[myhost] err:   File "<string>", line 1, in <module>
[myhost] err: ImportError: No module named pisa
[myhost] err: ---- End output of python -c "import pisa; print pisa.__path__" ----
[myhost] err: Ran python -c "import pisa; print pisa.__path__" returned 1
[myhost] err:     from /usr/lib/ruby/gems/1.8/gems/chef-0.9.12/bin/../lib/chef/shell_out.rb:218:in `error!'
[myhost] err:     from /usr/lib/ruby/gems/1.8/gems/chef-0.9.12/bin/../lib/chef/mixin/shell_out.rb:33:in `shell_out!'
[myhost] err:     from /usr/lib/ruby/gems/1.8/gems/chef-0.9.12/bin/../lib/chef/provider/package/easy_install.rb:69:in `load_current_resource'
[myhost] err:     from /usr/lib/ruby/gems/1.8/gems/chef-0.9.12/bin/../lib/chef/resource.rb:394:in `run_action'
[myhost] err:     from /usr/lib/ruby/gems/1.8/gems/chef-0.9.12/bin/../lib/chef/runner.rb:53:in `run_action'
[myhost] err:     from /usr/lib/ruby/gems/1.8/gems/chef-0.9.12/bin/../lib/chef/runner.rb:89:in `converge'
[myhost] err:     from /usr/lib/ruby/gems/1.8/gems/chef-0.9.12/bin/../lib/chef/runner.rb:89:in `each'
[myhost] err:     from /usr/lib/ruby/gems/1.8/gems/chef-0.9.12/bin/../lib/chef/runner.rb:89:in `converge'
[myhost] err:      ... 13 levels...
[myhost] err:     from /usr/lib/ruby/gems/1.8/gems/chef-0.9.12/bin/../lib/chef/application.rb:62:in `run'
[myhost] err:     from /usr/lib/ruby/gems/1.8/gems/chef-0.9.12/bin/chef-solo:25
[myhost] err:     from /usr/bin/chef-solo:19:in `load'
[myhost] err:     from /usr/bin/chef-solo:19
[myhost] out: [Wed, 20 Apr 2011 21:14:43 -0400] ERROR: easy_install_package[pisa] (/tmp/chef/site-cookbooks/mysite/recipes/default.rb:68:in `from_file') had an error:

The problem seems to be that easy_install_package is running 'python -c "import pisa; print pisa.__path__"', which of course will throw an error, because the actual module imported is called "ho.pisa", not "pisa", even though the egg file is simply called "pisa". How can modify easy_install_package to use the correct package name?

Regards,
Chris





Archive powered by MHonArc 2.6.16.

§