I'm using Opscode's application_python cookbook, and trying to deploy a Django application. I need to use Python 2.7 for this project, but it appears that the virtualenv creation is done with python2.6
by default, which I don't plan on installing on the system. Therefore, I get the following error when running chef-client
:
[Fri, 08 Jun 2012 16:55:35 +0000] FATAL: Mixlib::ShellOut::ShellCommandFailed: execute[virtualenv --python=python2.6 /opt/apps/trippingbear/shared/env] (/var/chef/cache/cookbooks/python/providers/virtualenv.rb line 28) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '3'
---- Begin output of virtualenv --python=python2.6 /opt/apps/trippingbear/shared/env ----
STDOUT: The executable python2.6 (from --python=python2.6) does not exist
STDERR:
---- End output of virtualenv --python=python2.6 /opt/apps/trippingbear/shared/env ----
Ran virtualenv --python=python2.6 /opt/apps/trippingbear/shared/env returned 3
I'm pretty (extremely) new to Chef, and haven't got an idea of how to change it. The default seems to be set with attribute :interpreter, :default => 'python2.6'
in cookbooks/python/resources/virtualenv.rb
. I've tried setting defaults both on my node and in the environment as the following, with no success:
default_attributes(
"python" => {
"virtualenv" => {
"interpreter" => "python2.7"
}
}
)
I'm sure this is configurable, but I can't figure out quite how to do it. What am I setting incorrectly?