Chef infra Chef无法安装scipy=MemoryError

Chef infra Chef无法安装scipy=MemoryError,chef-infra,chef-solo,Chef Infra,Chef Solo,我现在很担心在低ram环境中使用chef 我不能安装ScipyforPython的事实是不真实的。我必须等待一个错误..ssh进入服务器,手动运行pip install scipy并重新运行chef solo,然后服务器工作。RAM是服务器的1G 大厨,怎么回事 python_package 'scipy' do version '0.18.1' end --- 67.205.184.137 [2017-02-21T03:20:22+00:00] ERROR: bash[install_

我现在很担心在低ram环境中使用chef

我不能安装ScipyforPython的事实是不真实的。我必须等待一个错误..ssh进入服务器,手动运行pip install scipy并重新运行chef solo,然后服务器工作。RAM是服务器的1G

大厨,怎么回事

python_package 'scipy' do
  version '0.18.1'
end


--- 67.205.184.137 [2017-02-21T03:20:22+00:00] ERROR: bash[install_scipy] (forex::worker line 34) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '2'
---- Begin output of "bash"  "/tmp/chef-script20170221-3127-cmg0gp" ----
STDOUT: Collecting scipy==0.18.1
  Downloading scipy-0.18.1-cp27-cp27mu-manylinux1_x86_64.whl (40.3MB)
STDERR: /usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:318: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#snimissingwarning.
  SNIMissingWarning
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext
--- 67.205.184.137  object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
Exception:
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/usr/local/lib/python2.7/dist-packages/pip/commands/install.py", line 335, in run
    wb.build(autobuilding=True)
  File "/usr/local/lib/python2.7/dist-packages/pip/wheel.py", line 749, in build
    self.requirement_set.prepare_files(self.finder)
  File "/usr/local/lib/python2.7/dist-packages/pip/req/req_set.py", line 380, in prepare_files
    ignore_dependencies=self.ignore_dependencies))
  File "/usr/local/lib/python2.7/dist-packages/pip/req/req_set.py", line 620, in _prepare_file
    session=self.session, hashes=hash
--- 67.205.184.137 es)
  File "/usr/local/lib/python2.7/dist-packages/pip/download.py", line 821, in unpack_url
    hashes=hashes
  File "/usr/local/lib/python2.7/dist-packages/pip/download.py", line 659, in unpack_http_url
    hashes)
  File "/usr/local/lib/python2.7/dist-packages/pip/download.py", line 882, in _download_http_url
    _download_url(resp, link, content_file, hashes)
  File "/usr/local/lib/python2.7/dist-packages/pip/download.py", line 603, in _download_url
    hashes.check_against_chunks(downloaded_chunks)
  File "/usr/local/lib/python2.7/dist-packages/pip/utils/hashes.py", line 46, in check_against_chunks
    for chunk in chunks:
  File "/usr/local/lib/python2.7/dist-packages/pip/download.py", line 571, in written_chunks
    for chunk in chunks:
  File "/usr/local/lib/python2.7/dist-packages/pip/utils/ui.py", line 139, in iter
    for x in it:
  File "/usr/local/lib/python2.7/dist-packages/pip/download.py", line 560, in resp_read
    decode_content=False):
  File "/usr/local/lib/python2.7/dist-packages/pip/_ven
--- 67.205.184.137 dor/requests/packages/urllib3/response.py", line 357, in stream
    data = self.read(amt=amt, decode_content=decode_content)
  File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/response.py", line 314, in read
    data = self._fp.read(amt)
  File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/cachecontrol/filewrapper.py", line 63, in read
    self._close()
  File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/cachecontrol/filewrapper.py", line 50, in _close
    self.__callback(self.__buf.getvalue())
  File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/cachecontrol/controller.py", line 275, in cache_response
    self.serializer.dumps(request, response, body=body),
  File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/cachecontrol/serialize.py", line 87, in dumps
    ).encode("utf8"),
MemoryError
---- End output of "bash"  "/tmp/chef-script20170221-3127-cmg0gp" ----
Ran "bash"  "/tmp/chef-script20170221-3127-cmg0gp" returned 2

--- 67.205.184.137 [2017-02-21T03:20:22+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)

那个错误不是来自厨师,而是来自皮普。厨师对此实在无能为力。SciPy和NumPy都是非常复杂的库,需要编译许多花哨的C和Fortran(是的,真的)代码才能使它们工作。我会考虑在构建机器上构建控制盘文件,然后从中安装。

尝试
pip安装--no cache dir

有关详细信息,请参阅