【问题标题】:brew install ffmpeg installs python 3.9brew install ffmpeg 安装 python 3.9
【发布时间】:2021-02-25 15:36:04
【问题描述】:

由于某种原因brew install ffmpeg 下载 python 3.9 作为依赖

==> Installing dependencies for ffmpeg: gnutls, python@3.9, glib, cairo, gobject-introspection, harfbuzz, libass and libvpx

正如我在这里看到的 https://formulae.brew.sh/formula/ffmpeg 不依赖于 python 3.9

如何为我当前的 python Python 3.7.7 安装 ffmpeg?

更新:

也许我的 python 安装有问题?

brew info python

python@3.9: stable 3.9.0 (bottled)
Interpreted, interactive, object-oriented programming language
https://www.python.org/
/usr/local/Cellar/python/3.7.7 (4,165 files, 64.0MB) *
  Poured from bottle on 2020-04-03 at 20:11:58
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/python@3.9.rb
License: Python-2.0
==> Dependencies
Build: pkg-config ✔
Required: gdbm ✔, openssl@1.1 ✔, readline ✔, sqlite ✔, xz ✔
==> Caveats
Python has been installed as
  /usr/local/bin/python3

Unversioned symlinks `python`, `python-config`, `pip` etc. pointing to
`python3`, `python3-config`, `pip3` etc., respectively, have been installed into
  /usr/local/opt/python@3.9/libexec/bin

You can install Python packages with
  pip3 install <package>
They will install into the site-package directory
  /usr/local/lib/python3.9/site-packages

See: https://docs.brew.sh/Homebrew-and-Python
==> Analytics
install: 588,344 (30 days), 666,372 (90 days), 666,373 (365 days)
install-on-request: 104,126 (30 days), 105,703 (90 days), 105,705 (365 days)
build-error: 0 (30 days)

brew info 显示 python@3.9 但实际上是 3.7.7:

/usr/local/bin/python3 -V
Python 3.7.7

【问题讨论】:

    标签: python macos ffmpeg homebrew


    【解决方案1】:

    使用brew deps --tree ffmpeg显示依赖树;

    在这里你可以发现包glib需要python@3.9。 有一些bug reports 提到了这一点。

    您可以在手动安装任何所需的 deps 后安装 ffmpeg 而无需任何 deps;

    brew install --ignore-dependencies ffmpeg
    
    ffmpeg
    ├── ...
    ├── libass
    │   ├── freetype
    │   │   └── libpng
    │   ├── fribidi
    │   └── harfbuzz
    │       ├── cairo
    │       │   ├── fontconfig
    │       │   │   └── freetype
    │       │   │       └── libpng
    │       │   ├── freetype
    │       │   │   └── libpng
    │       │   ├── glib
    │       │   │   ├── gettext
    │       │   │   ├── libffi
    │       │   │   ├── pcre
    │       │   │   └── python@3.9
    │       │   │       ├── gdbm
    │       │   │       ├── openssl@1.1
    │       │   │       ├── readline
    │       │   │       ├── sqlite
    │       │   │       │   └── readline
    │       │   │       └── xz
    │       │   ├── libpng
    │       │   ├── lzo
    │       │   └── pixman
    │       ├── freetype
    │       │   └── libpng
    │       ├── glib
    │       │   ├── gettext
    │       │   ├── libffi
    │       │   ├── pcre
    │       │   └── python@3.9
    │       │       ├── gdbm
    │       │       ├── openssl@1.1
    │       │       ├── readline
    │       │       ├── sqlite
    │       │       │   └── readline
    │       │       └── xz
    │       ├── gobject-introspection
    │       │   ├── cairo
    │       │   │   ├── fontconfig
    │       │   │   │   └── freetype
    │       │   │   │       └── libpng
    │       │   │   ├── freetype
    │       │   │   │   └── libpng
    │       │   │   ├── glib
    │       │   │   │   ├── gettext
    │       │   │   │   ├── libffi
    │       │   │   │   ├── pcre
    │       │   │   │   └── python@3.9
    │       │   │   │       ├── gdbm
    │       │   │   │       ├── openssl@1.1
    │       │   │   │       ├── readline
    │       │   │   │       ├── sqlite
    │       │   │   │       │   └── readline
    │       │   │   │       └── xz
    │       │   │   ├── libpng
    │       │   │   ├── lzo
    │       │   │   └── pixman
    │       │   ├── glib
    │       │   │   ├── gettext
    │       │   │   ├── libffi
    │       │   │   ├── pcre
    │       │   │   └── python@3.9
    │       │   │       ├── gdbm
    │       │   │       ├── openssl@1.1
    │       │   │       ├── readline
    │       │   │       ├── sqlite
    │       │   │       │   └── readline
    │       │   │       └── xz
    │       │   ├── libffi
    │       │   ├── pkg-config
    │       │   └── python@3.9
    │       │       ├── gdbm
    │       │       ├── openssl@1.1
    │       │       ├── readline
    │       │       ├── sqlite
    │       │       │   └── readline
    │       │       └── xz
    │       ├── graphite2
    │       └── icu4c
    ├── ...
    
    

    【讨论】:

    • 在任何 python 版本上都需要python@3.9,或者你只是在带有python@3.9的系统上运行它?
    • 它需要那个python版本。列为部门。我的系统上没有安装 python@3.9。
    猜你喜欢
    • 1970-01-01
    • 2023-02-15
    • 1970-01-01
    • 2021-01-27
    • 2018-04-25
    • 2019-05-08
    • 2021-02-07
    • 1970-01-01
    • 2014-09-28
    相关资源
    最近更新 更多