saharmor / dalle-playground

A playground to generate images from any text prompt using Stable Diffusion (past: using DALL-E Mini)
MIT License
2.76k stars 597 forks source link

Running setup.py install for pillow ... error #39

Closed titusfx closed 2 years ago

titusfx commented 2 years ago

Running setup.py install for pillow ... error Running setup.py install for pillow ... error Running setup.py install for pillow ... error Running setup.py install for pillow ... error ythonhosted.org/packages/44/98/5b86278fbbf250d239ae0ecb724f8572af1c91f4a11edf4d36a206189440/colorama-0.4.4-py2.py3-none-any.whl Collecting commonmark<0.10.0,>=0.9.0 (from rich~=11.1.0->flax->-r requirements.txt (line 8)) Downloading https://files.pythonhosted.org/packages/b1/92/dfd892312d822f36c55366118b95d914e5f16de11044a27cf10a7d71bbbf/commonmark-0.9.1-py2.py3-none-any.whl (51kB) |████████████████████████████████| 51kB 25.2MB/s Collecting fonttools>=4.22.0 (from matplotlib->flax->-r requirements.txt (line 8)) Downloading https://files.pythonhosted.org/packages/2f/85/2f6e42fb4b537b9998835410578fb1973175b81691e9a82ab6668cf64b0b/fonttools-4.33.3-py3-none-any.whl (930kB) |████████████████████████████████| 931kB 29.0MB/s Collecting python-dateutil>=2.7 (from matplotlib->flax->-r requirements.txt (line 8)) Downloading https://files.pythonhosted.org/packages/36/7a/87837f39d0296e723bb9b62bbb257d0355c7f6128853c78955f57342a56d/python_dateutil-2.8.2-py2.py3-none-any.whl (247kB) |████████████████████████████████| 256kB 26.6MB/s Collecting kiwisolver>=1.0.1 (from matplotlib->flax->-r requirements.txt (line 8)) Downloading https://files.pythonhosted.org/packages/51/50/9a9a94afa26c50fc5d9127272737806990aa698c7a1c220b8e5075e70304/kiwisolver-1.4.2-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl (1.1MB) |████████████████████████████████| 1.1MB 26.3MB/s Collecting cycler>=0.10 (from matplotlib->flax->-r requirements.txt (line 8)) Downloading https://files.pythonhosted.org/packages/5c/f9/695d6bedebd747e5eb0fe8fad57b72fdf25411273a39791cde838d5a8f51/cycler-0.11.0-py3-none-any.whl Collecting gitdb<5,>=4.0.1 (from GitPython>=1.0.0->wandb->dalle-mini==0.1.0->-r requirements.txt (line 6)) Downloading https://files.pythonhosted.org/packages/a3/7c/5d747655049bfbf75b5fcec57c8115896cb78d6fafa84f6d3ef4c0f13a98/gitdb-4.0.9-py3-none-any.whl (63kB) |████████████████████████████████| 71kB 38.1MB/s Collecting flatbuffers<3.0,>=1.12 (from jaxlib>=0.1.37->optax->flax->-r requirements.txt (line 8)) Downloading https://files.pythonhosted.org/packages/3d/d0/26033c70d642fbc1e35d3619cf3210986fb953c173b1226709f75056c149/flatbuffers-2.0-py2.py3-none-any.whl Collecting toolz>=0.9.0 (from chex>=0.0.4->optax->flax->-r requirements.txt (line 8)) Downloading https://files.pythonhosted.org/packages/b5/f1/3df506b493736e3ee11fc1a3c2de8014a55f025d830a71bb499acc049a2c/toolz-0.11.2-py3-none-any.whl (55kB) |████████████████████████████████| 61kB 23.0MB/s Collecting dm-tree>=0.1.5 (from chex>=0.0.4->optax->flax->-r requirements.txt (line 8)) Downloading https://files.pythonhosted.org/packages/a4/b5/f4c721d479c6db0ea15c0fc2ed46c0a06b013e8930bc876aea030ede4805/dm_tree-0.1.7-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (143kB) |████████████████████████████████| 143kB 31.6MB/s Collecting smmap<6,>=3.0.1 (from gitdb<5,>=4.0.1->GitPython>=1.0.0->wandb->dalle-mini==0.1.0->-r requirements.txt (line 6)) Downloading https://files.pythonhosted.org/packages/6d/01/7caa71608bc29952ae09b0be63a539e50d2484bc37747797a66a60679856/smmap-5.0.0-py3-none-any.whl Building wheels for collected packages: transformers, dalle-mini, msgpack Building wheel for transformers (PEP 517) ... done Created wheel for transformers: filename=transformers-4.20.0.dev0-cp37-none-any.whl size=4392278 sha256=69a5502f28012f73940815403bd07102a5d9635620bfd4ee96c1a87761f16a5d Stored in directory: /tmp/pip-ephem-wheel-cache-tdfaawzj/wheels/33/eb/3b/4bf5dd835e865e472d4fc0754f35ac0edb08fe852e8f21655f Building wheel for dalle-mini (PEP 517) ... done Created wheel for dalle-mini: filename=dalle_mini-0.1.0-cp37-none-any.whl size=33998 sha256=34c2f0beeafcb64706b42988db283192ff9829a919a75054c071a76923bed870 Stored in directory: /tmp/pip-ephem-wheel-cache-tdfaawzj/wheels/8f/8b/51/446c34cf800feb07516f4a76fd266e67d8fba3e3d0b09f1df8 Building wheel for msgpack (PEP 517) ... done Created wheel for msgpack: filename=msgpack-1.0.4-cp37-cp37m-linux_x86_64.whl size=310291 sha256=316f1e52413d51cb275ee8393d0ebb5d9fff732127e8235f75c28752cfddfcf2 Stored in directory: /home/anyuser/.cache/pip/wheels/11/d4/bf/9213122db9816a32382b176cdb92ce62cb18fecf3a2a2d0307 Successfully built transformers dalle-mini msgpack Installing collected packages: zipp, typing-extensions, importlib-metadata, click, itsdangerous, MarkupSafe, Jinja2, Werkzeug, Flask, Six, Flask-Cors, aniso8601, pytz, Flask-RESTful, tqdm, absl-py, numpy, opt-einsum, scipy, jax, flatbuffers, jaxlib, toolz, dm-tree, chex, optax, pygments, colorama, commonmark, rich, msgpack, fonttools, pillow, pyparsing, packaging, python-dateutil, kiwisolver, cycler, matplotlib, flax, pyyaml, filelock, certifi, idna, urllib3, charset-normalizer, requests, huggingface-hub, tokenizers, regex, transformers, vqgan-jax, unidecode, emoji, sentry-sdk, smmap, gitdb, GitPython, psutil, setproctitle, promise, shortuuid, pathtools, docker-pycreds, protobuf, wandb, einops, wcwidth, ftfy, dalle-mini Running setup.py install for MarkupSafe ... done Running setup.py install for jax ... done Running setup.py install for pillow ... error ERROR: Command errored out with exit status 1: command: /home/anyuser/Projects/IA/dalle-playground/backend/mydalee_env/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-bjfk8s96/pillow/setup.py'"'"'; file='"'"'/tmp/pip-install-bjfk8s96/pillow/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-tdp_o0un/install-record.txt --single-version-externally-managed --compile --install-headers /home/anyuser/Projects/IA/dalle-playground/backend/mydalee_env/include/site/python3.7/pillow cwd: /tmp/pip-install-bjfk8s96/pillow/ Complete output (177 lines): running install running build running build_py creating build creating build/lib.linux-x86_64-3.7 creating build/lib.linux-x86_64-3.7/PIL copying src/PIL/ImageSequence.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/EpsImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/TiffImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/ImageTransform.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/McIdasImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/PcfFontFile.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/PdfImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/TarIO.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/PSDraw.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/ImagePath.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/SpiderImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/MspImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/BlpImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/_binary.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/PaletteFile.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/BufrStubImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/FitsImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/ImImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/features.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/Image.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/XVThumbImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/GbrImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/TgaImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/PalmImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/_version.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/TiffTags.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/JpegPresets.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/ImageMorph.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/ImageGrab.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/PpmImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/PcxImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/ImageCms.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/ImageColor.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/FpxImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/GifImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/DcxImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/Jpeg2KImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/ImageShow.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/ImagePalette.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/MicImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/ImageEnhance.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/GimpPaletteFile.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/_util.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/WalImageFile.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/ImageDraw.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/CurImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/FontFile.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/GdImageFile.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/ImageFile.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/PngImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/ImtImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/ImageFont.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/ContainerIO.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/ImageWin.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/IptcImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/SunImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/ExifTags.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/ImageTk.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/SgiImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/ImageFilter.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/_tkinter_finder.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/PsdImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/BdfFontFile.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/PdfParser.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/PixarImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/MpegImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/IcnsImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/JpegImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/ImageChops.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/WmfImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/ImageDraw2.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/IcoImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/WebPImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/PyAccess.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/init.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/ImageQt.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/ImageMath.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/DdsImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/XbmImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/Hdf5StubImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/ImageStat.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/MpoImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/FtexImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/ImageMode.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/FitsStubImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/ImageOps.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/GribStubImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/PcdImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/GimpGradientFile.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/main.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/BmpImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/XpmImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL copying src/PIL/FliImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL running egg_info writing src/Pillow.egg-info/PKG-INFO writing dependency_links to src/Pillow.egg-info/dependency_links.txt writing requirements to src/Pillow.egg-info/requires.txt writing top-level names to src/Pillow.egg-info/top_level.txt reading manifest file 'src/Pillow.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' warning: no files found matching '.c' warning: no files found matching '.h' warning: no files found matching '.sh' warning: no previously-included files found matching '.appveyor.yml' warning: no previously-included files found matching '.clang-format' warning: no previously-included files found matching '.coveragerc' warning: no previously-included files found matching '.editorconfig' warning: no previously-included files found matching '.readthedocs.yml' warning: no previously-included files found matching 'codecov.yml' 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 no previously-included directories found matching '.ci' writing manifest file 'src/Pillow.egg-info/SOURCES.txt' running build_ext

The headers or library files could not be found for zlib,
a required dependency when compiling Pillow from source.

Please see the install instructions at:
   https://pillow.readthedocs.io/en/latest/installation.html

Traceback (most recent call last):
  File "/tmp/pip-install-bjfk8s96/pillow/setup.py", line 996, in <module>
    zip_safe=not (debug_build() or PLATFORM_MINGW),
  File "/home/anyuser/Projects/IA/dalle-playground/backend/mydalee_env/lib/python3.7/site-packages/setuptools/__init__.py", line 145, in setup
    return distutils.core.setup(**attrs)
  File "/home/anyuser/anaconda3/lib/python3.7/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/home/anyuser/anaconda3/lib/python3.7/distutils/dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "/home/anyuser/anaconda3/lib/python3.7/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/home/anyuser/Projects/IA/dalle-playground/backend/mydalee_env/lib/python3.7/site-packages/setuptools/command/install.py", line 61, in run
    return orig.install.run(self)
  File "/home/anyuser/anaconda3/lib/python3.7/distutils/command/install.py", line 545, in run
    self.run_command('build')
  File "/home/anyuser/anaconda3/lib/python3.7/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/home/anyuser/anaconda3/lib/python3.7/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/home/anyuser/anaconda3/lib/python3.7/distutils/command/build.py", line 135, in run
    self.run_command(cmd_name)
  File "/home/anyuser/anaconda3/lib/python3.7/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/home/anyuser/anaconda3/lib/python3.7/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/home/anyuser/Projects/IA/dalle-playground/backend/mydalee_env/lib/python3.7/site-packages/setuptools/command/build_ext.py", line 84, in run
    _build_ext.run(self)
  File "/home/anyuser/anaconda3/lib/python3.7/distutils/command/build_ext.py", line 340, in run
    self.build_extensions()
  File "/tmp/pip-install-bjfk8s96/pillow/setup.py", line 804, in build_extensions
    raise RequiredDependencyException(f)
__main__.RequiredDependencyException: zlib

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/tmp/pip-install-bjfk8s96/pillow/setup.py", line 1009, in <module>
    raise RequiredDependencyException(msg)
__main__.RequiredDependencyException:

The headers or library files could not be found for zlib,
a required dependency when compiling Pillow from source.

Please see the install instructions at:
   https://pillow.readthedocs.io/en/latest/installation.html

----------------------------------------

ERROR: Command errored out with exit status 1: /home/anyuser/Projects/IA/dalle-playground/backend/mydalee_env/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-bjfk8s96/pillow/setup.py'"'"'; file='"'"'/tmp/pip-install-bjfk8s96/pillow/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-tdp_o0un/install-record.txt --single-version-externally-managed --compile --install-headers /home/anyuser/Projects/IA/dalle-playground/backend/mydalee_env/include/site/python3.7/pillow Check the logs for full command output.

titusfx commented 2 years ago

Fixed with

pip install --upgrade pip sudo apt install libjpeg8-dev zlib1g-dev pip install --ignore-installed pillow

Here are more possible solutions:

https://github.com/python-pillow/Pillow/issues/4242