簡體   English   中英

在 macos 上安裝 ueberzug 的問題

[英]Issues installing ueberzug on macos

我最近一直在使用 lf 文件管理器,想嘗試將 ueberzug 設置為我的預覽器。 但是,讓 ueberzug 在我的 Mac 上正確安裝和運行是一個真正的問題。 是不是我缺少一些依賴項,比如 X11 或其他一些庫? 如果有人能幫我解決這個問題,我將不勝感激

這是我運行的命令: pip3 install ueberzug

這是返回碼:

Collecting ueberzug
  Using cached ueberzug-18.1.9.tar.gz (36 kB)
  Preparing metadata (setup.py) ... done
Requirement already satisfied: python-xlib in /opt/homebrew/lib/python3.10/site-packages (from ueberzug) (0.31)
Requirement already satisfied: pillow in /opt/homebrew/lib/python3.10/site-packages (from ueberzug) (9.2.0)
Requirement already satisfied: docopt in /opt/homebrew/lib/python3.10/site-packages (from ueberzug) (0.6.2)
Requirement already satisfied: attrs>=18.2.0 in /opt/homebrew/lib/python3.10/site-packages (from ueberzug) (22.1.0)
Requirement already satisfied: six>=1.10.0 in /opt/homebrew/lib/python3.10/site-packages (from python-xlib->ueberzug) (1.16.0)
Building wheels for collected packages: ueberzug
  Building wheel for ueberzug (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [51 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.macosx-12-arm64-cpython-310
      creating build/lib.macosx-12-arm64-cpython-310/ueberzug
      copying ueberzug/scaling.py -> build/lib.macosx-12-arm64-cpython-310/ueberzug
      copying ueberzug/tmux_util.py -> build/lib.macosx-12-arm64-cpython-310/ueberzug
      copying ueberzug/files.py -> build/lib.macosx-12-arm64-cpython-310/ueberzug
      copying ueberzug/xutil.py -> build/lib.macosx-12-arm64-cpython-310/ueberzug
      copying ueberzug/loading.py -> build/lib.macosx-12-arm64-cpython-310/ueberzug
      copying ueberzug/thread.py -> build/lib.macosx-12-arm64-cpython-310/ueberzug
      copying ueberzug/version.py -> build/lib.macosx-12-arm64-cpython-310/ueberzug
      copying ueberzug/library.py -> build/lib.macosx-12-arm64-cpython-310/ueberzug
      copying ueberzug/terminal.py -> build/lib.macosx-12-arm64-cpython-310/ueberzug
      copying ueberzug/ui.py -> build/lib.macosx-12-arm64-cpython-310/ueberzug
      copying ueberzug/batch.py -> build/lib.macosx-12-arm64-cpython-310/ueberzug
      copying ueberzug/conversion.py -> build/lib.macosx-12-arm64-cpython-310/ueberzug
      copying ueberzug/__init__.py -> build/lib.macosx-12-arm64-cpython-310/ueberzug
      copying ueberzug/pattern.py -> build/lib.macosx-12-arm64-cpython-310/ueberzug
      copying ueberzug/query_windows.py -> build/lib.macosx-12-arm64-cpython-310/ueberzug
      copying ueberzug/action.py -> build/lib.macosx-12-arm64-cpython-310/ueberzug
      copying ueberzug/parser.py -> build/lib.macosx-12-arm64-cpython-310/ueberzug
      copying ueberzug/geometry.py -> build/lib.macosx-12-arm64-cpython-310/ueberzug
      copying ueberzug/layer.py -> build/lib.macosx-12-arm64-cpython-310/ueberzug
      copying ueberzug/process.py -> build/lib.macosx-12-arm64-cpython-310/ueberzug
      copying ueberzug/__main__.py -> build/lib.macosx-12-arm64-cpython-310/ueberzug
      creating build/lib.macosx-12-arm64-cpython-310/ueberzug/lib
      copying ueberzug/lib/__init__.py -> build/lib.macosx-12-arm64-cpython-310/ueberzug/lib
      creating build/lib.macosx-12-arm64-cpython-310/ueberzug/lib/v0
      copying ueberzug/lib/v0/__init__.py -> build/lib.macosx-12-arm64-cpython-310/ueberzug/lib/v0
      running egg_info
      writing ueberzug.egg-info/PKG-INFO
      writing dependency_links to ueberzug.egg-info/dependency_links.txt
      writing entry points to ueberzug.egg-info/entry_points.txt
      writing requirements to ueberzug.egg-info/requires.txt
      writing top-level names to ueberzug.egg-info/top_level.txt
      reading manifest file 'ueberzug.egg-info/SOURCES.txt'
      reading manifest template 'MANIFEST.in'
      writing manifest file 'ueberzug.egg-info/SOURCES.txt'
      copying ueberzug/lib/lib.sh -> build/lib.macosx-12-arm64-cpython-310/ueberzug/lib
      running build_ext
      building 'Xshm' extension
      creating build/temp.macosx-12-arm64-cpython-310
      creating build/temp.macosx-12-arm64-cpython-310/Xshm
      clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk -I/opt/homebrew/opt/python@3.10/Frameworks/Python.framework/Versions/3.10/include/python3.10 -c Xshm/Xshm.c -o build/temp.macosx-12-arm64-cpython-310/Xshm/Xshm.o
      Xshm/Xshm.c:5:10: fatal error: 'X11/Xlib.h' file not found
      #include <X11/Xlib.h>
               ^~~~~~~~~~~~
      1 error generated.
      error: command '/usr/bin/clang' failed with exit code 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for ueberzug
  Running setup.py clean for ueberzug
Failed to build ueberzug
Installing collected packages: ueberzug
  Running setup.py install for ueberzug ... error
  error: subprocess-exited-with-error

  × Running setup.py install for ueberzug did not run successfully.
  │ exit code: 1
  ╰─> [53 lines of output]
      running install
      /opt/homebrew/lib/python3.10/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        warnings.warn(
      running build
      running build_py
      creating build
      creating build/lib.macosx-12-arm64-cpython-310
      creating build/lib.macosx-12-arm64-cpython-310/ueberzug
      copying ueberzug/scaling.py -> build/lib.macosx-12-arm64-cpython-310/ueberzug
      copying ueberzug/tmux_util.py -> build/lib.macosx-12-arm64-cpython-310/ueberzug
      copying ueberzug/files.py -> build/lib.macosx-12-arm64-cpython-310/ueberzug
      copying ueberzug/xutil.py -> build/lib.macosx-12-arm64-cpython-310/ueberzug
      copying ueberzug/loading.py -> build/lib.macosx-12-arm64-cpython-310/ueberzug
      copying ueberzug/thread.py -> build/lib.macosx-12-arm64-cpython-310/ueberzug
      copying ueberzug/version.py -> build/lib.macosx-12-arm64-cpython-310/ueberzug
      copying ueberzug/library.py -> build/lib.macosx-12-arm64-cpython-310/ueberzug
      copying ueberzug/terminal.py -> build/lib.macosx-12-arm64-cpython-310/ueberzug
      copying ueberzug/ui.py -> build/lib.macosx-12-arm64-cpython-310/ueberzug
      copying ueberzug/batch.py -> build/lib.macosx-12-arm64-cpython-310/ueberzug
      copying ueberzug/conversion.py -> build/lib.macosx-12-arm64-cpython-310/ueberzug
      copying ueberzug/__init__.py -> build/lib.macosx-12-arm64-cpython-310/ueberzug
      copying ueberzug/pattern.py -> build/lib.macosx-12-arm64-cpython-310/ueberzug
      copying ueberzug/query_windows.py -> build/lib.macosx-12-arm64-cpython-310/ueberzug
      copying ueberzug/action.py -> build/lib.macosx-12-arm64-cpython-310/ueberzug
      copying ueberzug/parser.py -> build/lib.macosx-12-arm64-cpython-310/ueberzug
      copying ueberzug/geometry.py -> build/lib.macosx-12-arm64-cpython-310/ueberzug
      copying ueberzug/layer.py -> build/lib.macosx-12-arm64-cpython-310/ueberzug
      copying ueberzug/process.py -> build/lib.macosx-12-arm64-cpython-310/ueberzug
      copying ueberzug/__main__.py -> build/lib.macosx-12-arm64-cpython-310/ueberzug
      creating build/lib.macosx-12-arm64-cpython-310/ueberzug/lib
      copying ueberzug/lib/__init__.py -> build/lib.macosx-12-arm64-cpython-310/ueberzug/lib
      creating build/lib.macosx-12-arm64-cpython-310/ueberzug/lib/v0
      copying ueberzug/lib/v0/__init__.py -> build/lib.macosx-12-arm64-cpython-310/ueberzug/lib/v0
      running egg_info
      writing ueberzug.egg-info/PKG-INFO
      writing dependency_links to ueberzug.egg-info/dependency_links.txt
      writing entry points to ueberzug.egg-info/entry_points.txt
      writing requirements to ueberzug.egg-info/requires.txt
      writing top-level names to ueberzug.egg-info/top_level.txt
      reading manifest file 'ueberzug.egg-info/SOURCES.txt'
      reading manifest template 'MANIFEST.in'
      writing manifest file 'ueberzug.egg-info/SOURCES.txt'
      copying ueberzug/lib/lib.sh -> build/lib.macosx-12-arm64-cpython-310/ueberzug/lib
      running build_ext
      building 'Xshm' extension
      creating build/temp.macosx-12-arm64-cpython-310
      creating build/temp.macosx-12-arm64-cpython-310/Xshm
      clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk -I/opt/homebrew/opt/python@3.10/Frameworks/Python.framework/Versions/3.10/include/python3.10 -c Xshm/Xshm.c -o build/temp.macosx-12-arm64-cpython-310/Xshm/Xshm.o
      Xshm/Xshm.c:5:10: fatal error: 'X11/Xlib.h' file not found
      #include <X11/Xlib.h>
               ^~~~~~~~~~~~
      1 error generated.
      error: command '/usr/bin/clang' failed with exit code 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> ueberzug

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

對於那些在同一個問題上苦苦掙扎的人,您所要做的就是在~/.pydistutils.cfg文件中添加幾行。 如果您沒有此文件,只需使用以下命令在您的主目錄中創建該文件: touch ~/.pydistutils.cfg 然后將以下行添加到您的~/.pydistutils.cfg

[build_ext]
include_dirs=/opt/X11/include
library_dirs=/opt/X11/lib

所有功勞歸於該網站以解決問題https://dotfiles.rickbooth.me/docs/terminal/ueberzug

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM