错误代码1使用pip在pyvenv中安装PIL

奎克莱夫

我正在尝试在pyvenv(Python 3+)内安装PIL,但由于“错误代码1”而失败。请参阅下面的错误,或者在此之后,从终端查看完整的安装日志:

Command "/home/eli/Desktop/dad_site/venv/bin/python3.5 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-3qrplwqe/pillow/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-u1rsh_l0-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/eli/Desktop/dad_site/venv/include/site/python3.5/pillow" failed with error code 1 in /tmp/pip-build-3qrplwqe/pillow/

--

(venv) eli@Github:~/Desktop/dad_site/venv$ pip install pillow
Collecting pillow
  Using cached Pillow-3.2.0.zip
Installing collected packages: pillow
  Running setup.py install for pillow ... error
    Complete output from command /home/eli/Desktop/dad_site/venv/bin/python3.5 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-3qrplwqe/pillow/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-u1rsh_l0-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/eli/Desktop/dad_site/venv/include/site/python3.5/pillow:
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.5
    creating build/lib.linux-x86_64-3.5/PIL
    copying PIL/ImageChops.py -> build/lib.linux-x86_64-3.5/PIL
    copying PIL/MpoImagePlugin.py -> build/lib.linux-x86_64-3.5/PIL
    copying PIL/ImageMorph.py -> build/lib.linux-x86_64-3.5/PIL
    copying PIL/PsdImagePlugin.py -> build/lib.linux-x86_64-3.5/PIL
    copying PIL/ImageDraw2.py -> build/lib.linux-x86_64-3.5/PIL
    copying PIL/__init__.py -> build/lib.linux-x86_64-3.5/PIL
    copying PIL/ImageMath.py -> build/lib.linux-x86_64-3.5/PIL
    copying PIL/BufrStubImagePlugin.py -> build/lib.linux-x86_64-3.5/PIL
    copying PIL/WebPImagePlugin.py -> build/lib.linux-x86_64-3.5/PIL
    copying PIL/PpmImagePlugin.py -> build/lib.linux-x86_64-3.5/PIL
    copying PIL/ImImagePlugin.py -> build/lib.linux-x86_64-3.5/PIL
    copying PIL/XbmImagePlugin.py -> build/lib.linux-x86_64-3.5/PIL
    copying PIL/_util.py -> build/lib.linux-x86_64-3.5/PIL
    copying PIL/ImageDraw.py -> build/lib.linux-x86_64-3.5/PIL
    copying PIL/SunImagePlugin.py -> build/lib.linux-x86_64-3.5/PIL
    copying PIL/XVThumbImagePlugin.py -> build/lib.linux-x86_64-3.5/PIL
    copying PIL/_binary.py -> build/lib.linux-x86_64-3.5/PIL
    copying PIL/WalImageFile.py -> build/lib.linux-x86_64-3.5/PIL
    copying PIL/PcxImagePlugin.py -> build/lib.linux-x86_64-3.5/PIL
    copying PIL/ContainerIO.py -> build/lib.linux-x86_64-3.5/PIL
    copying PIL/DdsImagePlugin.py -> build/lib.linux-x86_64-3.5/PIL
    copying PIL/PngImagePlugin.py -> build/lib.linux-x86_64-3.5/PIL
    copying PIL/ImageTransform.py -> build/lib.linux-x86_64-3.5/PIL
    copying PIL/Hdf5StubImagePlugin.py -> build/lib.linux-x86_64-3.5/PIL
    copying PIL/GimpGradientFile.py -> build/lib.linux-x86_64-3.5/PIL
    copying PIL/ImageShow.py -> build/lib.linux-x86_64-3.5/PIL
    copying PIL/XpmImagePlugin.py -> build/lib.linux-x86_64-3.5/PIL
    copying PIL/MpegImagePlugin.py -> build/lib.linux-x86_64-3.5/PIL
    copying PIL/IptcImagePlugin.py -> build/lib.linux-x86_64-3.5/PIL
    copying PIL/DcxImagePlugin.py -> build/lib.linux-x86_64-3.5/PIL
    copying PIL/TiffImagePlugin.py -> build/lib.linux-x86_64-3.5/PIL
    copying PIL/ImageQt.py -> build/lib.linux-x86_64-3.5/PIL
    copying PIL/ImageSequence.py -> build/lib.linux-x86_64-3.5/PIL
    copying PIL/IcnsImagePlugin.py -> build/lib.linux-x86_64-3.5/PIL
    copying PIL/GdImageFile.py -> build/lib.linux-x86_64-3.5/PIL
    copying PIL/Image.py -> build/lib.linux-x86_64-3.5/PIL
    copying PIL/MspImagePlugin.py -> build/lib.linux-x86_64-3.5/PIL
    copying PIL/FtexImagePlugin.py -> build/lib.linux-x86_64-3.5/PIL
    copying PIL/GimpPaletteFile.py -> build/lib.linux-x86_64-3.5/PIL
    copying PIL/ImageFont.py -> build/lib.linux-x86_64-3.5/PIL
    copying PIL/features.py -> build/lib.linux-x86_64-3.5/PIL
    copying PIL/ImageOps.py -> build/lib.linux-x86_64-3.5/PIL
    copying PIL/CurImagePlugin.py -> build/lib.linux-x86_64-3.5/PIL
    copying PIL/FitsStubImagePlugin.py -> build/lib.linux-x86_64-3.5/PIL
    copying PIL/GbrImagePlugin.py -> build/lib.linux-x86_64-3.5/PIL
    copying PIL/FpxImagePlugin.py -> build/lib.linux-x86_64-3.5/PIL
    copying PIL/ImageStat.py -> build/lib.linux-x86_64-3.5/PIL
    copying PIL/BdfFontFile.py -> build/lib.linux-x86_64-3.5/PIL
    copying PIL/TgaImagePlugin.py -> build/lib.linux-x86_64-3.5/PIL
    copying PIL/FliImagePlugin.py -> build/lib.linux-x86_64-3.5/PIL
    copying PIL/ImageMode.py -> build/lib.linux-x86_64-3.5/PIL
    copying PIL/ImagePath.py -> build/lib.linux-x86_64-3.5/PIL
    copying PIL/ImageGrab.py -> build/lib.linux-x86_64-3.5/PIL
    copying PIL/IcoImagePlugin.py -> build/lib.linux-x86_64-3.5/PIL
    copying PIL/TarIO.py -> build/lib.linux-x86_64-3.5/PIL
    copying PIL/ImageWin.py -> build/lib.linux-x86_64-3.5/PIL
    copying PIL/GifImagePlugin.py -> build/lib.linux-x86_64-3.5/PIL
    copying PIL/ImageEnhance.py -> build/lib.linux-x86_64-3.5/PIL
    copying PIL/ImagePalette.py -> build/lib.linux-x86_64-3.5/PIL
    copying PIL/SgiImagePlugin.py -> build/lib.linux-x86_64-3.5/PIL
    copying PIL/BmpImagePlugin.py -> build/lib.linux-x86_64-3.5/PIL
    copying PIL/FontFile.py -> build/lib.linux-x86_64-3.5/PIL
    copying PIL/OleFileIO.py -> build/lib.linux-x86_64-3.5/PIL
    copying PIL/ImageCms.py -> build/lib.linux-x86_64-3.5/PIL
    copying PIL/McIdasImagePlugin.py -> build/lib.linux-x86_64-3.5/PIL
    copying PIL/ImageFile.py -> build/lib.linux-x86_64-3.5/PIL
    copying PIL/PaletteFile.py -> build/lib.linux-x86_64-3.5/PIL
    copying PIL/MicImagePlugin.py -> build/lib.linux-x86_64-3.5/PIL
    copying PIL/ImageColor.py -> build/lib.linux-x86_64-3.5/PIL
    copying PIL/PyAccess.py -> build/lib.linux-x86_64-3.5/PIL
    copying PIL/PSDraw.py -> build/lib.linux-x86_64-3.5/PIL
    copying PIL/Jpeg2KImagePlugin.py -> build/lib.linux-x86_64-3.5/PIL
    copying PIL/PcdImagePlugin.py -> build/lib.linux-x86_64-3.5/PIL
    copying PIL/PixarImagePlugin.py -> build/lib.linux-x86_64-3.5/PIL
    copying PIL/EpsImagePlugin.py -> build/lib.linux-x86_64-3.5/PIL
    copying PIL/GribStubImagePlugin.py -> build/lib.linux-x86_64-3.5/PIL
    copying PIL/PcfFontFile.py -> build/lib.linux-x86_64-3.5/PIL
    copying PIL/JpegImagePlugin.py -> build/lib.linux-x86_64-3.5/PIL
    copying PIL/ImageTk.py -> build/lib.linux-x86_64-3.5/PIL
    copying PIL/TiffTags.py -> build/lib.linux-x86_64-3.5/PIL
    copying PIL/ExifTags.py -> build/lib.linux-x86_64-3.5/PIL
    copying PIL/JpegPresets.py -> build/lib.linux-x86_64-3.5/PIL
    copying PIL/ImtImagePlugin.py -> build/lib.linux-x86_64-3.5/PIL
    copying PIL/ImageFilter.py -> build/lib.linux-x86_64-3.5/PIL
    copying PIL/SpiderImagePlugin.py -> build/lib.linux-x86_64-3.5/PIL
    copying PIL/WmfImagePlugin.py -> build/lib.linux-x86_64-3.5/PIL
    copying PIL/PalmImagePlugin.py -> build/lib.linux-x86_64-3.5/PIL
    copying PIL/PdfImagePlugin.py -> build/lib.linux-x86_64-3.5/PIL
    running egg_info
    writing top-level names to Pillow.egg-info/top_level.txt
    writing dependency_links to Pillow.egg-info/dependency_links.txt
    writing Pillow.egg-info/PKG-INFO
    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-x86_64-3.5/PIL
    running build_ext
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-3qrplwqe/pillow/setup.py", line 767, in <module>
        zip_safe=not debug_build(), )
      File "/usr/lib/python3.5/distutils/core.py", line 148, in setup
        dist.run_commands()
      File "/usr/lib/python3.5/distutils/dist.py", line 955, in run_commands
        self.run_command(cmd)
      File "/usr/lib/python3.5/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/home/eli/Desktop/dad_site/venv/lib/python3.5/site-packages/setuptools/command/install.py", line 61, in run
        return orig.install.run(self)
      File "/usr/lib/python3.5/distutils/command/install.py", line 583, in run
        self.run_command('build')
      File "/usr/lib/python3.5/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/usr/lib/python3.5/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/usr/lib/python3.5/distutils/command/build.py", line 135, in run
        self.run_command(cmd_name)
      File "/usr/lib/python3.5/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/usr/lib/python3.5/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/usr/lib/python3.5/distutils/command/build_ext.py", line 338, in run
        self.build_extensions()
      File "/tmp/pip-build-3qrplwqe/pillow/setup.py", line 512, in build_extensions
        ' using --disable-%s, aborting' % (f, f))
    ValueError: jpeg is required unless explicitly disabled using --disable-jpeg, aborting

    ----------------------------------------
Command "/home/eli/Desktop/dad_site/venv/bin/python3.5 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-3qrplwqe/pillow/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-u1rsh_l0-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/eli/Desktop/dad_site/venv/include/site/python3.5/pillow" failed with error code 1 in /tmp/pip-build-3qrplwqe/pillow/
埃德温克斯

https://stackoverflow.com/a/34631976/486919的答案表明您的系统缺少某些依赖项。尝试一下sudo apt install libjpeg8-dev

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

pip install dotenv错误代码1 Windows 10

Pythonsetuptools pkg_resources pip wheel失败,错误代码为1 [错误]

安装scipy时出现“错误代码1失败”

错误代码1安装Scrapy

无法安装tesseract-ocr软件包-``在/ tmp / pip_build_root / tesseract-ocr中编译失败,错误代码为1''

无法安装pip install pyautogui,错误代码1

npm安装错误代码128

使用pip安装pygame:命令“ python setup.py egg_info”失败,错误代码为1

pip安装MySQL-python时出现错误代码1

无法安装Django:/ tmp / pip-build-rcF9a5 / Django /中的命令“ python setup.py egg_info”失败,错误代码为1

提示安装“ python setup.py egg_info”的Pip安装失败,错误代码为1错误

无法为Python 3.7的pip安装pygame-命令“ python setup.py egg_info”失败,错误代码为1

“ pip安装模型”-“ python setup.py egg_info”失败,错误代码为1

mysqlclient安装失败,错误代码为1

点安装会引发错误代码1

python pip install poster给我错误->命令“ python setup.py egg_info”在C:\ Users \中失败,错误代码为1

pip安装错误命令“ python setup.py egg_info”失败,错误代码为1

pip在安装pyzmail时失败,错误代码为1

无法安装软件-获取错误代码1

安装php-pear时发生错误,dpkg错误返回错误代码1

在Ubuntu 16.04中安装MSSQL Server时获取错误代码(1)

PIP安装失败,在fastlz模块上出现退出代码2 /错误代码1

pip安装paramiko失败,错误代码为1

egg_info在python 3.6中的pip安装失败,错误代码为1

无法通过 pip 安装 Pyautogui:错误代码 1

Ffmpeg 在 AWS Lamda 函数中返回错误代码 1

在 macOS 上安装 netfilterqueue 时的错误代码(退出代码 1)

异常中的错误代码

npm 安装失败错误构建失败,错误代码:1