CoderBotOrg/backend

"pip3 install -r requirements.txt" have these these errors

Closed this issue · 2 comments

(coderbot) pi@raspberrypi:~/coderbot $ pip3 install -r requirements.txt
Collecting absl-py==0.4.1 (from -r requirements.txt (line 1))
  Using cached https://www.piwheels.org/simple/absl-py/absl_py-0.4.1-py3-none-any.whl
Collecting apiai==1.2.3 (from -r requirements.txt (line 2))
  Using cached https://files.pythonhosted.org/packages/34/b3/c5bf31e1980b89dfc6f8a3d70d64988fb619ed831109b500b254fe541ce6/apiai-1.2.3-py2.py3-none-any.whl
Collecting astor==0.7.1 (from -r requirements.txt (line 3))
  Using cached https://files.pythonhosted.org/packages/35/6b/11530768cac581a12952a2aad00e1526b89d242d0b9f59534ef6e6a1752f/astor-0.7.1-py2.py3-none-any.whl
Collecting Babel==2.5.3 (from -r requirements.txt (line 4))
  Using cached https://files.pythonhosted.org/packages/94/03/14e68ad12e771a79cf96792f7158d68a7b3d8c7b2badf39e9ef1f65b57d6/Babel-2.5.3-py2.py3-none-any.whl
Collecting certifi==2018.4.16 (from -r requirements.txt (line 5))
  Using cached https://files.pythonhosted.org/packages/7c/e6/92ad559b7192d846975fc916b65f667c7b8c3a32bea7372340bfe9a15fa5/certifi-2018.4.16-py2.py3-none-any.whl
Collecting chardet==3.0.4 (from -r requirements.txt (line 6))
  Using cached https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl
Collecting click==6.7 (from -r requirements.txt (line 7))
  Using cached https://files.pythonhosted.org/packages/34/c1/8806f99713ddb993c5366c362b2f908f18269f8d792aff1abfd700775a77/click-6.7-py2.py3-none-any.whl
Collecting clickclick==1.2.2 (from -r requirements.txt (line 8))
  Using cached https://files.pythonhosted.org/packages/b6/51/2b04f7a56dcbacc0e3a7cf726e1d88d28866bf488a7a0668582306e1e643/clickclick-1.2.2-py2.py3-none-any.whl
Collecting connexion==1.4.2 (from -r requirements.txt (line 9))
  Using cached https://files.pythonhosted.org/packages/9f/1b/5e509fd2921827aaa7a5f39530593b95667c9c8da8289628d42efaf7432c/connexion-1.4.2-py2.py3-none-any.whl
Collecting Flask==1.0.2 (from -r requirements.txt (line 10))
  Using cached https://files.pythonhosted.org/packages/7f/e7/08578774ed4536d3242b14dacb4696386634607af824ea997202cd0edb4b/Flask-1.0.2-py2.py3-none-any.whl
Collecting Flask-Babel==0.11.2 (from -r requirements.txt (line 11))
  Using cached https://files.pythonhosted.org/packages/c6/1b/ce9253dc6a71ede1d7b19cd280f7a21219b47ac75005dd97bcfbdbe8eab9/Flask_Babel-0.11.2-py2.py3-none-any.whl
Collecting Flask-Cors==3.0.4 (from -r requirements.txt (line 12))
  Using cached https://files.pythonhosted.org/packages/61/f8/6a978ee0a2592463f8ab9e8834789126a32d5244a57b3f58b5cb4cd6cfe5/Flask_Cors-3.0.4-py2.py3-none-any.whl
Collecting gast==0.2.0 (from -r requirements.txt (line 13))
  Using cached https://www.piwheels.org/simple/gast/gast-0.2.0-py3-none-any.whl
Collecting grpcio==1.15.0 (from -r requirements.txt (line 14))
  Using cached https://files.pythonhosted.org/packages/af/64/f0378edf5078514c4fd68b67f6d1117332eee569ac51bac41fa3a562250e/grpcio-1.15.0-cp35-cp35m-linux_armv7l.whl
Collecting idna==2.6 (from -r requirements.txt (line 15))
  Using cached https://files.pythonhosted.org/packages/27/cc/6dd9a3869f15c2edfab863b992838277279ce92663d334df9ecf5106f5c6/idna-2.6-py2.py3-none-any.whl
Collecting inflection==0.3.1 (from -r requirements.txt (line 16))
  Using cached https://www.piwheels.org/simple/inflection/inflection-0.3.1-py3-none-any.whl
Collecting itsdangerous==0.24 (from -r requirements.txt (line 17))
  Using cached https://www.piwheels.org/simple/itsdangerous/itsdangerous-0.24-py3-none-any.whl
Collecting Jinja2==2.10 (from -r requirements.txt (line 18))
  Using cached https://files.pythonhosted.org/packages/7f/ff/ae64bacdfc95f27a016a7bed8e8686763ba4d277a78ca76f32659220a731/Jinja2-2.10-py2.py3-none-any.whl
Collecting jsonschema==2.6.0 (from -r requirements.txt (line 19))
  Using cached https://files.pythonhosted.org/packages/77/de/47e35a97b2b05c2fadbec67d44cfcdcd09b8086951b331d82de90d2912da/jsonschema-2.6.0-py2.py3-none-any.whl
Collecting Markdown==2.6.11 (from -r requirements.txt (line 20))
  Using cached https://files.pythonhosted.org/packages/6d/7d/488b90f470b96531a3f5788cf12a93332f543dbab13c423a5e7ce96a0493/Markdown-2.6.11-py2.py3-none-any.whl
Collecting MarkupSafe==1.0 (from -r requirements.txt (line 21))
  Using cached https://www.piwheels.org/simple/markupsafe/MarkupSafe-1.0-cp35-cp35m-linux_armv7l.whl
Collecting numpy==1.14.3 (from -r requirements.txt (line 22))
  Using cached https://www.piwheels.org/simple/numpy/numpy-1.14.3-cp35-cp35m-linux_armv7l.whl
Collecting opencv-contrib-python==3.4.0.12 (from -r requirements.txt (line 23))
  Using cached https://www.piwheels.org/simple/opencv-contrib-python/opencv_contrib_python-3.4.0.12-cp35-cp35m-linux_armv7l.whl
Collecting pigpio==1.40.post1 (from -r requirements.txt (line 24))
  Using cached https://files.pythonhosted.org/packages/76/38/f8cc5307ce65e79fab59385a56338716ab721fb27e4c116fdfc4226b000e/pigpio-1.40.post1-py2.py3-none-any.whl
Collecting Pillow==5.1.0 (from -r requirements.txt (line 25))
  Using cached https://www.piwheels.org/simple/pillow/Pillow-5.1.0-cp35-cp35m-linux_armv7l.whl
Collecting protobuf==3.6.1 (from -r requirements.txt (line 26))
  Using cached https://files.pythonhosted.org/packages/77/78/a7f1ce761e2c738e209857175cd4f90a8562d1bde32868a8cd5290d58926/protobuf-3.6.1-py2.py3-none-any.whl
Collecting PyAudio==0.2.11 (from -r requirements.txt (line 27))
  Using cached https://files.pythonhosted.org/packages/ab/42/b4f04721c5c5bfc196ce156b3c768998ef8c0ae3654ed29ea5020c749a6b/PyAudio-0.2.11.tar.gz
Collecting pycairo==1.17.0 (from -r requirements.txt (line 28))
  Using cached https://www.piwheels.org/simple/pycairo/pycairo-1.17.0-cp35-cp35m-linux_armv7l.whl
Collecting Pypubsub==4.0.0 (from -r requirements.txt (line 29))
  Using cached https://files.pythonhosted.org/packages/ab/9e/3b50915d3346971aaa49074425788598ee4907e67c097e013f1a862bd45c/Pypubsub-4.0.0-py3-none-any.whl
Collecting pytz==2018.4 (from -r requirements.txt (line 30))
  Using cached https://files.pythonhosted.org/packages/dc/83/15f7833b70d3e067ca91467ca245bae0f6fe56ddc7451aa0dc5606b120f2/pytz-2018.4-py2.py3-none-any.whl
Collecting PyYAML==3.12 (from -r requirements.txt (line 31))
  Using cached https://www.piwheels.org/simple/pyyaml/PyYAML-3.12-cp35-cp35m-linux_armv7l.whl
Collecting requests==2.20.0 (from -r requirements.txt (line 32))
  Using cached https://files.pythonhosted.org/packages/f1/ca/10332a30cb25b627192b4ea272c351bce3ca1091e541245cccbace6051d8/requests-2.20.0-py2.py3-none-any.whl
Collecting six==1.11.0 (from -r requirements.txt (line 33))
  Using cached https://files.pythonhosted.org/packages/67/4b/141a581104b1f6397bfa78ac9d43d8ad29a7ca43ea90a2d863fe3056e86a/six-1.11.0-py2.py3-none-any.whl
Collecting smbus2==0.2.0 (from -r requirements.txt (line 34))
  Using cached https://www.piwheels.org/simple/smbus2/smbus2-0.2.0-py3-none-any.whl
Collecting swagger-spec-validator==2.3.1 (from -r requirements.txt (line 35))
  Using cached https://files.pythonhosted.org/packages/74/e4/0f945c923dcdb05f900426701b6d95810dc7e612045f778881dd490a38b7/swagger_spec_validator-2.3.1-py2.py3-none-any.whl
Collecting tensorboard==1.10.0 (from -r requirements.txt (line 36))
  Using cached https://files.pythonhosted.org/packages/c6/17/ecd918a004f297955c30b4fffbea100b1606c225dbf0443264012773c3ff/tensorboard-1.10.0-py3-none-any.whl
Collecting tensorflow==1.10.1 (from -r requirements.txt (line 37))
  Downloading https://www.piwheels.org/simple/tensorflow/tensorflow-1.10.1-cp35-none-linux_armv7l.whl (77.1MB)
    99% |████████████████████████████████| 77.1MB 1.6MB/s eta 0:00:01Exception:
Traceback (most recent call last):
  File "/home/pi/coderbot/lib/python3.5/site-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/home/pi/coderbot/lib/python3.5/site-packages/pip/commands/install.py", line 353, in run
    wb.build(autobuilding=True)
  File "/home/pi/coderbot/lib/python3.5/site-packages/pip/wheel.py", line 749, in build
    self.requirement_set.prepare_files(self.finder)
  File "/home/pi/coderbot/lib/python3.5/site-packages/pip/req/req_set.py", line 380, in prepare_files
    ignore_dependencies=self.ignore_dependencies))
  File "/home/pi/coderbot/lib/python3.5/site-packages/pip/req/req_set.py", line 620, in _prepare_file
    session=self.session, hashes=hashes)
  File "/home/pi/coderbot/lib/python3.5/site-packages/pip/download.py", line 821, in unpack_url
    hashes=hashes
  File "/home/pi/coderbot/lib/python3.5/site-packages/pip/download.py", line 659, in unpack_http_url
    hashes)
  File "/home/pi/coderbot/lib/python3.5/site-packages/pip/download.py", line 882, in _download_http_url
    _download_url(resp, link, content_file, hashes)
  File "/home/pi/coderbot/lib/python3.5/site-packages/pip/download.py", line 603, in _download_url
    hashes.check_against_chunks(downloaded_chunks)
  File "/home/pi/coderbot/lib/python3.5/site-packages/pip/utils/hashes.py", line 46, in check_against_chunks
    for chunk in chunks:
  File "/home/pi/coderbot/lib/python3.5/site-packages/pip/download.py", line 571, in written_chunks
    for chunk in chunks:
  File "/home/pi/coderbot/lib/python3.5/site-packages/pip/utils/ui.py", line 139, in iter
    for x in it:
  File "/home/pi/coderbot/lib/python3.5/site-packages/pip/download.py", line 560, in resp_read
    decode_content=False):
  File "/home/pi/coderbot/share/python-wheels/urllib3-1.19.1-py2.py3-none-any.whl/urllib3/response.py", line 432, in stream
    data = self.read(amt=amt, decode_content=decode_content)
  File "/home/pi/coderbot/share/python-wheels/urllib3-1.19.1-py2.py3-none-any.whl/urllib3/response.py", line 380, in read
    data = self._fp.read(amt)
  File "/home/pi/coderbot/share/python-wheels/CacheControl-0.11.7-py2.py3-none-any.whl/cachecontrol/filewrapper.py", line 63, in read
    self._close()
  File "/home/pi/coderbot/share/python-wheels/CacheControl-0.11.7-py2.py3-none-any.whl/cachecontrol/filewrapper.py", line 50, in _close
    self.__callback(self.__buf.getvalue())
  File "/home/pi/coderbot/share/python-wheels/CacheControl-0.11.7-py2.py3-none-any.whl/cachecontrol/controller.py", line 275, in cache_response
    self.serializer.dumps(request, response, body=body),
  File "/home/pi/coderbot/share/python-wheels/CacheControl-0.11.7-py2.py3-none-any.whl/cachecontrol/serialize.py", line 55, in dumps
    "body": _b64_encode_bytes(body),
  File "/home/pi/coderbot/share/python-wheels/CacheControl-0.11.7-py2.py3-none-any.whl/cachecontrol/serialize.py", line 12, in _b64_encode_bytes
    return base64.b64encode(b).decode("ascii")
  File "/usr/lib/python3.5/base64.py", line 59, in b64encode
    encoded = binascii.b2a_base64(s)[:-1]
MemoryError

This is likely a problem with raspberry / your machine.
Can you try

pip3 install -r requirements.txt --no-cache-dir

I try few times between the two until it finish.
But I dont know why I am getting that error, I hope it will be fixed with better procedure.

pip3 install -r requirements.txt --no-cache-dir
pip3 install -r requirements.txt