我正在使用 Opscode 的application_python说明书,并尝试部署 Django 应用程序。我需要为此项目使用 Python 2.7,但似乎python2.6
默认情况下已完成 virtualenv 创建,我不打算在系统上安装它。因此,运行时出现以下错误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
我对 Chef 非常(非常)陌生,还不知道如何更改它。默认值似乎设置为attribute :interpreter, :default => 'python2.6'
in cookbooks/python/resources/virtualenv.rb
。我已经尝试在我的节点和环境中设置默认值,如下所示,但没有成功:
default_attributes(
"python" => {
"virtualenv" => {
"interpreter" => "python2.7"
}
}
)
我确定这是可配置的,但我不知道该怎么做。我设置错了什么?