zoukankan      html  css  js  c++  java
  • iphone 越狱后 安装 pillow 报错 (未解决, 仅记录)

    【iphone 越狱后 安装 pillow】报错:
    yangdj-6sp:/private/var/mobile/Library/ZXTouch/scripts/naruto root# pip3 install pillow
    Collecting pillow
    Using cached Pillow-8.2.0.tar.gz (47.9 MB)
    ERROR: Command errored out with exit status 1:
    command: /bin/python3 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/tmp/pip-install-v47tvl6k/pillow_ce831a7f628a43ba880def2d783e6b0e/setup.py'"'"'; __file__='"'"'/private/var/tmp/pip-install-v47tvl6k/pillow_ce831a7f628a43ba880def2d783e6b0e/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"' '"'"', '"'"' '"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/tmp/pip-pip-egg-info-5l3xym_g
    cwd: /private/var/tmp/pip-install-v47tvl6k/pillow_ce831a7f628a43ba880def2d783e6b0e/
    Complete output (13 lines):
    Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/usr/lib/python3.7/site-packages/setuptools/__init__.py", line 18, in <module>
    from setuptools.dist import Distribution
    File "/usr/lib/python3.7/site-packages/setuptools/dist.py", line 38, in <module>
    from setuptools import windows_support
    File "/usr/lib/python3.7/site-packages/setuptools/windows_support.py", line 2, in <module>
    import ctypes
    File "/usr/lib/python3.7/ctypes/__init__.py", line 7, in <module>
    from _ctypes import Union, Structure, Array
    ImportError: dlopen(/usr/lib/python3.7/lib-dynload/_ctypes.cpython-37m-darwin.so, 2): Library not loaded: /usr/lib/libffi.6.dylib
    Referenced from: /usr/lib/python3.7/lib-dynload/_ctypes.cpython-37m-darwin.so
    Reason: image not found
    ----------------------------------------
    WARNING: Discarding https://files.pythonhosted.org/packages/21/23/af6bac2a601be6670064a817273d4190b79df6f74d8012926a39bc7aa77f/Pillow-8.2.0.tar.gz#sha256=a787ab10d7bb5494e5f76536ac460741788f1fbce851068d73a87ca7c35fc3e1 (from https://pypi.org/simple/pillow/) (requires-python:>=3.6). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

    尝试安装libffi:apt-get install libffi

    再次尝试安装PIL,报错:
    no previously-included directories found matching '.ci'
    adding license file 'LICENSE'
    writing manifest file 'src/Pillow.egg-info/SOURCES.txt'
    running build_ext
    Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/private/var/tmp/pip-install-mbzk3efv/pillow_2a5a82978a0943a1893ecb98bba52682/setup.py", line 1020, in <module>
    zip_safe=not (debug_build() or PLATFORM_MINGW),
    File "/usr/lib/python3.7/site-packages/setuptools/__init__.py", line 153, in setup
    return distutils.core.setup(**attrs)
    File "/usr/lib/python3.7/distutils/core.py", line 148, in setup
    dist.run_commands()
    File "/usr/lib/python3.7/distutils/dist.py", line 966, in run_commands
    self.run_command(cmd)
    File "/usr/lib/python3.7/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
    File "/usr/lib/python3.7/site-packages/wheel/bdist_wheel.py", line 299, in run
    self.run_command('build')
    File "/usr/lib/python3.7/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
    File "/usr/lib/python3.7/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
    File "/usr/lib/python3.7/distutils/command/build.py", line 135, in run
    self.run_command(cmd_name)
    File "/usr/lib/python3.7/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
    File "/usr/lib/python3.7/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
    File "/usr/lib/python3.7/site-packages/setuptools/command/build_ext.py", line 79, in run
    _build_ext.run(self)
    File "/usr/lib/python3.7/distutils/command/build_ext.py", line 310, in run
    customize_compiler(self.compiler)
    File "/usr/lib/python3.7/distutils/sysconfig.py", line 183, in customize_compiler
    _osx_support.customize_compiler(_config_vars)
    File "/usr/lib/python3.7/_osx_support.py", line 418, in customize_compiler
    _find_appropriate_compiler(_config_vars)
    File "/usr/lib/python3.7/_osx_support.py", line 191, in _find_appropriate_compiler
    "Cannot locate working compiler")
    SystemError: Cannot locate working compiler
    ----------------------------------------
    ERROR: Failed building wheel for pillow
    Running setup.py clean for pillow

    尝试:Cydia搜索安装iOS Toolchain(需要安装ipone-gcc?但没有这个,于是尝试安装toolchain)
    报错:
    Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/private/var/tmp/pip-install-1xwbsmcp/pillow_78cebbba4f4647c19527666bb382e40c/setup.py", line 1033, 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

    尝试:apt-get install libjpeg-dev zlib1g-dev
    https://blog.csdn.net/weixin_42536182/article/details/103711178
    https://debugah.com/pillow-install-errorthe-headers-or-library-files-could-not-be-found-for-jpeg-4186/
    报错:
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    E: Unable to locate package zlib1g-dev


    弃用pillow,改成使用"magick"(magick convert home.jpg -resize 50%x50% home_test.jpg)
    安装方式:Cydia > 软件源(tab) > 单独软件源(https://apt.bingner.com) > 多媒体 > ImageMagick
    使用参考:https://www.cnblogs.com/lfri/p/11601211.html

    2021-07-21 尝试*(失败):

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

    尝试在不安装zxtouch的前提下(纯净环境下)使用pip安装PIL(因zxtouch插件重新安装过python3,看是不是因此引起的,碰下运气)

    这个库依赖了c语言的一些东西,需要c/c++的编译器,而且依赖的库也很多,基本没戏(难度太高)

  • 相关阅读:
    gulp自动化压缩合并、加版本号解决方案
    利用gulp 插件gulp.spritesmith 完成小图合成精灵图,并自动输出样式文件
    gulp插件(8)
    gulp插件 run-sequence(同步执行任务)
    gulp合并压缩
    Freemarker 基础概念
    querystring模块详解
    深入理解JavaScript的闭包特性如何给循环中的对象添加事件
    堆中的路径
    公式求值
  • 原文地址:https://www.cnblogs.com/Denny_Yang/p/15030900.html
Copyright © 2011-2022 走看看