1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
Dismiss Notice

Welcome To SNBForums

SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.

If you'd like to post a question, simply register and have at it!

While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!

Please help to diagnose this error

Discussion in 'Asuswrt-Merlin' started by digimon04, Nov 12, 2016.

  1. digimon04

    digimon04 Occasional Visitor

    Joined:
    May 30, 2016
    Messages:
    37
    I want to install pillow so I do the following:

    opkg install python python-pip

    and then

    HOME=/tmp/mnt/sda1/python pip install pillow

    Putty shows:

    Collecting pillow
    Downloading Pillow-3.4.2.tar.gz (10.8MB)
    99% |████████████████████████████████| 10.8MB 3.0MB/s eta 0:00:01Exception:
    Traceback (most recent call last):
    File "/opt/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
    File "/opt/lib/python2.7/site-packages/pip/commands/install.py", line 299, in run
    requirement_set.prepare_files(finder)
    File "/opt/lib/python2.7/site-packages/pip/req/req_set.py", line 370, in prepare_files
    ignore_dependencies=self.ignore_dependencies))
    File "/opt/lib/python2.7/site-packages/pip/req/req_set.py", line 587, in _prepare_file
    session=self.session, hashes=hashes)
    File "/opt/lib/python2.7/site-packages/pip/download.py", line 810, in unpack_url
    hashes=hashes
    File "/opt/lib/python2.7/site-packages/pip/download.py", line 649, in unpack_http_url
    hashes)
    File "/opt/lib/python2.7/site-packages/pip/download.py", line 871, in _download_http_url
    _download_url(resp, link, content_file, hashes)
    File "/opt/lib/python2.7/site-packages/pip/download.py", line 595, in _download_url
    hashes.check_against_chunks(downloaded_chunks)
    File "/opt/lib/python2.7/site-packages/pip/utils/hashes.py", line 46, in check_against_chunks
    for chunk in chunks:
    File "/opt/lib/python2.7/site-packages/pip/download.py", line 563, in written_chunks
    for chunk in chunks:
    File "/opt/lib/python2.7/site-packages/pip/utils/ui.py", line 139, in iter
    for x in it:
    File "/opt/lib/python2.7/site-packages/pip/download.py", line 552, in resp_read
    decode_content=False):
    File "/opt/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/response.py", line 353, in stream
    data = self.read(amt=amt, decode_content=decode_content)
    File "/opt/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/response.py", line 310, in read
    data = self._fp.read(amt)
    File "/opt/lib/python2.7/site-packages/pip/_vendor/cachecontrol/filewrapper.py", line 54, in read
    self.__callback(self.__buf.getvalue())
    File "/opt/lib/python2.7/site-packages/pip/_vendor/cachecontrol/controller.py", line 275, in cache_response
    self.serializer.dumps(request, response, body=body),
    File "/opt/lib/python2.7/site-packages/pip/_vendor/cachecontrol/serialize.py", line 87, in dumps
    ).encode("utf8"),
    MemoryError

    What does it mean? How can I solve it?
     
  2. Please support SNBForums! Just click on this link before you buy something from Amazon and we'll get a small commission on anything you buy. Thanks!
  3. ColinTaylor

    ColinTaylor Part of the Furniture

    Joined:
    Mar 31, 2014
    Messages:
    6,755
    Location:
    UK
  4. Fitz Mutch

    Fitz Mutch Senior Member

    Joined:
    May 27, 2016
    Messages:
    462
    Location:
    Portsmouth
    The /tmp folder is held in RAM. If Python is using lots of TEMP space, you may need to change it to use disk space instead of RAM.
    Code:
    /bin/mkdir -p /opt/tmp2
    export TEMP=/opt/tmp2
    
     
  5. digimon04

    digimon04 Occasional Visitor

    Joined:
    May 30, 2016
    Messages:
    37
    Thanks for the help. I tried with --no-cache-dir and it seems there is still error

    [email protected]:/tmp/home/root# HOME=/tmp/mnt/sda1/python pip --no-cache-dir
    install pillow
    Collecting pillow
    Downloading Pillow-3.4.2.tar.gz (10.8MB)
    100% |████████████████████████████████| 10.8MB 3.3MB/s
    Installing collected packages: pillow
    Running setup.py install for pillow ... error
    Complete output from command /opt/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/tmp/mnt/sda1/entware/tmp/pip-build-yDiLm_/pillow/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /opt/tmp/pip-JuJZlE-record/install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-armv7l-2.7
    creating build/lib.linux-armv7l-2.7/PIL
    copying PIL/ImageDraw2.py -> build/lib.linux-armv7l-2.7/PIL

    ***** ignore for the word counts *****

    copying PIL/IcoImagePlugin.py -> build/lib.linux-armv7l-2.7/PIL
    running egg_info
    writing Pillow.egg-info/PKG-INFO
    writing top-level names to Pillow.egg-info/top_level.txt
    writing dependency_links to Pillow.egg-info/dependency_links.txt
    warning: manifest_maker: standard file '-c' not found

    reading manifest file 'Pillow.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    warning: no files found matching '*.sh'
    no previously-included directories found matching 'docs/_static'
    warning: no previously-included files found matching '.coveragerc'
    warning: no previously-included files found matching '.editorconfig'
    warning: no previously-included files found matching '.landscape.yaml'
    warning: no previously-included files found matching 'appveyor.yml'
    warning: no previously-included files found matching 'build_children.sh'
    warning: no previously-included files found matching 'tox.ini'
    warning: no previously-included files matching '.git*' found anywhere in distribution
    warning: no previously-included files matching '*.pyc' found anywhere in distribution
    warning: no previously-included files matching '*.so' found anywhere in distribution
    writing manifest file 'Pillow.egg-info/SOURCES.txt'
    copying PIL/OleFileIO-README.md -> build/lib.linux-armv7l-2.7/PIL
    warning: build_py: byte-compiling is disabled, skipping.

    running build_ext
    Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/tmp/mnt/sda1/entware/tmp/pip-build-yDiLm_/pillow/setup.py", line 753, in <module>
    zip_safe=not debug_build(), )
    File "/opt/lib/python2.7/distutils/core.py", line 151, in setup
    dist.run_commands()
    File "/opt/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
    File "/opt/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
    File "/opt/lib/python2.7/site-packages/setuptools/command/install.py", line 61, in run
    return orig.install.run(self)
    File "/opt/lib/python2.7/distutils/command/install.py", line 563, in run
    self.run_command('build')
    File "/opt/lib/python2.7/distutils/cmd.py", line 326, in run_command
    self.distribution.run_command(command)
    File "/opt/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
    File "/opt/lib/python2.7/distutils/command/build.py", line 127, in run
    self.run_command(cmd_name)
    File "/opt/lib/python2.7/distutils/cmd.py", line 326, in run_command
    self.distribution.run_command(command)
    File "/opt/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
    File "/opt/lib/python2.7/distutils/command/build_ext.py", line 342, in run
    self.build_extensions()
    File "/tmp/mnt/sda1/entware/tmp/pip-build-yDiLm_/pillow/setup.py", line 521, in build_extensions
    ' using --disable-%s, aborting' % (f, f))
    ValueError: zlib is required unless explicitly disabled using --disable-zlib, aborting

    ----------------------------------------
    Command "/opt/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/tmp/mnt/sda1/entware/tmp/pip-build-yDiLm_/pillow/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /opt/tmp/pip-JuJZlE-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/mnt/sda1/entware/tmp/pip-build-yDiLm_/pillow/
     
  6. ColinTaylor

    ColinTaylor Part of the Furniture

    Joined:
    Mar 31, 2014
    Messages:
    6,755
    Location:
    UK
    Yes but now it's progressed further.:)

    Try fixing this error.;)
     
  7. digimon04

    digimon04 Occasional Visitor

    Joined:
    May 30, 2016
    Messages:
    37
    I tried opkg info zlib and it showed that zlib is installed.

    If I include the command --disable-zlib, it returns:

    [email protected]:/tmp/home/root# HOME=/tmp/mnt/sda1/python pip --disable-zlib install pillow

    Usage:
    pip <command> [options]

    no such option: --disable-zlib
    [email protected]:/tmp/home/root#
     
  8. ColinTaylor

    ColinTaylor Part of the Furniture

    Joined:
    Mar 31, 2014
    Messages:
    6,755
    Location:
    UK
  9. digimon04

    digimon04 Occasional Visitor

    Joined:
    May 30, 2016
    Messages:
    37
    Last edited: Nov 14, 2016
  10. digimon04

    digimon04 Occasional Visitor

    Joined:
    May 30, 2016
    Messages:
    37
    After the installation of zlib-dev, I tried HOME=/tmp/mnt/sda1/python pip --no-cache-dir install pillow

    This time, it shows:

    ValueError: jpeg is required unless explicitly disabled using --disable-jpeg, aborting

    I am sure libjpeg has been installed. Therefore, I tried:

    HOME=/tmp/mnt/sda1/python pip --no-cache-dir install pillow --global-option="--disable-jpeg"

    Still no go. The result is :

    [email protected]:/tmp/home/root# HOME=/tmp/mnt/sda1/python pip --no-cache-dir
    install pillow --global-option="--disable-jpeg"
    /opt/lib/python2.7/site-packages/pip/commands/install.py:180: UserWarning: Disabling all use of wheels due to the use of --build-options / --global-options / --install-options.
    cmdoptions.check_install_build_global(options)
    Collecting pillow
    Downloading Pillow-3.4.2.tar.gz (10.8MB)
    100% |████████████████████████████████| 10.8MB 3.0MB/s
    Installing collected packages: pillow
    Running setup.py install for pillow ... error
    Complete output from command /opt/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/tmp/mnt/sda1/entware/tmp/pip-build-qVUKah/pillow/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" --disable-jpeg install --record /opt/tmp/pip-xIgLvD-record/install-record.txt --single-version-externally-managed --compile:
    usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
    or: -c --help [cmd1 cmd2 ...]
    or: -c --help-commands
    or: -c cmd --help

    error: option --disable-jpeg not recognized


    Any help is appreciated.
     
Please support SNBForums! Just click on this link before you buy something from Amazon and we'll get a small commission on anything you buy. Thanks!