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

MemoryError when installing latest lambda-packages #27

Closed
robertdfrench opened this issue Nov 8, 2016 · 3 comments
Closed

MemoryError when installing latest lambda-packages #27

robertdfrench opened this issue Nov 8, 2016 · 3 comments

Comments

@robertdfrench
Copy link

Is anyone else running in to this?

I am trying to install lambda-packages with pip 9.0.1 in a py2.7.12 virtualenv on amazon linux and getting a MemoryError. This is a small box with half a gig of ram, but I am not running any other processes. If no one else is seeing this, I will just chalk it up to cheap hardware.

(.venv)[ec2-user@ec2-dev-box dope-ass-lambda-app]$ pip install lambda-packages
Collecting lambda-packages
  Downloading lambda_packages-0.10.0-py2-none-any.whl (56.1MB)
    99% |############################### | 56.1MB 50.1MB/s eta 0:00:01Exception:
Traceback (most recent call last):
  File "/home/ec2-user/dope-ass-lambda-app/.venv/local/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/home/ec2-user/dope-ass-lambda-app/.venv/local/lib/python2.7/site-packages/pip/commands/install.py", line 324, in run
    requirement_set.prepare_files(finder)
  File "/home/ec2-user/dope-ass-lambda-app/.venv/local/lib/python2.7/site-packages/pip/req/req_set.py", line 380, in prepare_files
    ignore_dependencies=self.ignore_dependencies))
  File "/home/ec2-user/dope-ass-lambda-app/.venv/local/lib/python2.7/site-packages/pip/req/req_set.py", line 620, in _prepare_file
    session=self.session, hashes=hashes)
  File "/home/ec2-user/dope-ass-lambda-app/.venv/local/lib/python2.7/site-packages/pip/download.py", line 821, in unpack_url
    hashes=hashes
  File "/home/ec2-user/dope-ass-lambda-app/.venv/local/lib/python2.7/site-packages/pip/download.py", line 659, in unpack_http_url
    hashes)
  File "/home/ec2-user/dope-ass-lambda-app/.venv/local/lib/python2.7/site-packages/pip/download.py", line 882, in _download_http_url
    _download_url(resp, link, content_file, hashes)
  File "/home/ec2-user/dope-ass-lambda-app/.venv/local/lib/python2.7/site-packages/pip/download.py", line 603, in _download_url
    hashes.check_against_chunks(downloaded_chunks)
  File "/home/ec2-user/dope-ass-lambda-app/.venv/local/lib/python2.7/site-packages/pip/utils/hashes.py", line 46, in check_against_chunks
    for chunk in chunks:
  File "/home/ec2-user/dope-ass-lambda-app/.venv/local/lib/python2.7/site-packages/pip/download.py", line 571, in written_chunks
    for chunk in chunks:
  File "/home/ec2-user/dope-ass-lambda-app/.venv/local/lib/python2.7/site-packages/pip/utils/ui.py", line 139, in iter
    for x in it:
  File "/home/ec2-user/dope-ass-lambda-app/.venv/local/lib/python2.7/site-packages/pip/download.py", line 560, in resp_read
    decode_content=False):
  File "/home/ec2-user/dope-ass-lambda-app/.venv/local/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/response.py", line 357, in stream
    data = self.read(amt=amt, decode_content=decode_content)
  File "/home/ec2-user/dope-ass-lambda-app/.venv/local/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/response.py", line 314, in read
    data = self._fp.read(amt)
  File "/home/ec2-user/dope-ass-lambda-app/.venv/local/lib/python2.7/site-packages/pip/_vendor/cachecontrol/filewrapper.py", line 63, in read
    self._close()
  File "/home/ec2-user/dope-ass-lambda-app/.venv/local/lib/python2.7/site-packages/pip/_vendor/cachecontrol/filewrapper.py", line 50, in _close
    self.__callback(self.__buf.getvalue())
  File "/home/ec2-user/dope-ass-lambda-app/.venv/local/lib/python2.7/site-packages/pip/_vendor/cachecontrol/controller.py", line 275, in cache_response
    self.serializer.dumps(request, response, body=body),
  File "/home/ec2-user/dope-ass-lambda-app/.venv/local/lib/python2.7/site-packages/pip/_vendor/cachecontrol/serialize.py", line 55, in dumps
    "body": _b64_encode_bytes(body),
  File "/home/ec2-user/dope-ass-lambda-app/.venv/local/lib/python2.7/site-packages/pip/_vendor/cachecontrol/serialize.py", line 12, in _b64_encode_bytes
    return base64.b64encode(b).decode("ascii")
MemoryError
@Miserlou
Copy link
Owner

Miserlou commented Nov 8, 2016

That sounds like it might be a bug in pip, maybe report upstream?

From my phone..

On Nov 8, 2016 4:14 AM, "Robert D. French" [email protected] wrote:

Is anyone else running in to this?

I am trying to install lambda-packages with pip 9.0.1 in a py2.7.12
virtualenv on amazon linux and getting a MemoryError. This is a small box
with half a gig of ram, but I am not running any other processes. If no one
else is seeing this, I will just chalk it up to cheap hardware.

(.venv)[ec2-user@ec2-dev-box dope-ass-lambda-app]$ pip install lambda-packages
Collecting lambda-packages
Downloading lambda_packages-0.10.0-py2-none-any.whl (56.1MB)
99% |############################### | 56.1MB 50.1MB/s eta 0:00:01Exception:
Traceback (most recent call last):
File "/home/ec2-user/dope-ass-lambda-app/.venv/local/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/home/ec2-user/dope-ass-lambda-app/.venv/local/lib/python2.7/site-packages/pip/commands/install.py", line 324, in run
requirement_set.prepare_files(finder)
File "/home/ec2-user/dope-ass-lambda-app/.venv/local/lib/python2.7/site-packages/pip/req/req_set.py", line 380, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "/home/ec2-user/dope-ass-lambda-app/.venv/local/lib/python2.7/site-packages/pip/req/req_set.py", line 620, in _prepare_file
session=self.session, hashes=hashes)
File "/home/ec2-user/dope-ass-lambda-app/.venv/local/lib/python2.7/site-packages/pip/download.py", line 821, in unpack_url
hashes=hashes
File "/home/ec2-user/dope-ass-lambda-app/.venv/local/lib/python2.7/site-packages/pip/download.py", line 659, in unpack_http_url
hashes)
File "/home/ec2-user/dope-ass-lambda-app/.venv/local/lib/python2.7/site-packages/pip/download.py", line 882, in _download_http_url
_download_url(resp, link, content_file, hashes)
File "/home/ec2-user/dope-ass-lambda-app/.venv/local/lib/python2.7/site-packages/pip/download.py", line 603, in _download_url
hashes.check_against_chunks(downloaded_chunks)
File "/home/ec2-user/dope-ass-lambda-app/.venv/local/lib/python2.7/site-packages/pip/utils/hashes.py", line 46, in check_against_chunks
for chunk in chunks:
File "/home/ec2-user/dope-ass-lambda-app/.venv/local/lib/python2.7/site-packages/pip/download.py", line 571, in written_chunks
for chunk in chunks:
File "/home/ec2-user/dope-ass-lambda-app/.venv/local/lib/python2.7/site-packages/pip/utils/ui.py", line 139, in iter
for x in it:
File "/home/ec2-user/dope-ass-lambda-app/.venv/local/lib/python2.7/site-packages/pip/download.py", line 560, in resp_read
decode_content=False):
File "/home/ec2-user/dope-ass-lambda-app/.venv/local/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/response.py", line 357, in stream
data = self.read(amt=amt, decode_content=decode_content)
File "/home/ec2-user/dope-ass-lambda-app/.venv/local/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/response.py", line 314, in read
data = self._fp.read(amt)
File "/home/ec2-user/dope-ass-lambda-app/.venv/local/lib/python2.7/site-packages/pip/_vendor/cachecontrol/filewrapper.py", line 63, in read
self._close()
File "/home/ec2-user/dope-ass-lambda-app/.venv/local/lib/python2.7/site-packages/pip/_vendor/cachecontrol/filewrapper.py", line 50, in _close
self.__callback(self.__buf.getvalue())
File "/home/ec2-user/dope-ass-lambda-app/.venv/local/lib/python2.7/site-packages/pip/_vendor/cachecontrol/controller.py", line 275, in cache_response
self.serializer.dumps(request, response, body=body),
File "/home/ec2-user/dope-ass-lambda-app/.venv/local/lib/python2.7/site-packages/pip/_vendor/cachecontrol/serialize.py", line 55, in dumps
"body": _b64_encode_bytes(body),
File "/home/ec2-user/dope-ass-lambda-app/.venv/local/lib/python2.7/site-packages/pip/_vendor/cachecontrol/serialize.py", line 12, in _b64_encode_bytes
return base64.b64encode(b).decode("ascii")
MemoryError


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#27, or mute the
thread
https://github.com/notifications/unsubscribe-auth/AAIi09c3y2kPV_xqr6YD2my26_UmVyKhks5q7-kqgaJpZM4Kr_RQ
.

@robertdfrench
Copy link
Author

Yup! It looks related to pypa/pip#2984, and the workaround suggested by those folks also worked for me. Thanks @Miserlou

@Miserlou
Copy link
Owner

Thanks for reporting that, @robertdfrench. For those who stumble upon this error, the work-around referenced is to use pip install --no-cache-dir lambda-packages

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

2 participants