问题描述
出于某些原因
brew install ffmpeg 下载python 3.9作为依赖项
For some reason brew install ffmpeg
downloads python 3.9 as dependence
==> 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
As I can see here https://formulae.brew.sh/formula/ffmpeg there is no dependence on python 3.9
如何为当前的Python Python 3.7.7安装ffmpeg?
How can I install ffmpeg for my current python Python 3.7.7?
更新:
也许我的python安装中有问题?
Maybe something is broken in my python installation?
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:
brew info
shows python@3.9
but actually it's 3.7.7:
/usr/local/bin/python3 -V
Python 3.7.7
推荐答案
使用 brew deps --tree ffmpeg
显示依赖关系树;
Using brew deps --tree ffmpeg
shows the dependancy tree;
在这里您可以找到软件包 glib
需要 python@3.9
.有一些错误报告对此进行了提及.
Here you can find that the package glib
requires python@3.9
.There are some bug reports mentioning this.
在手动安装了所有必需的dep之后,您可以不使用任何dep即可安装 ffmpeg
;
You could install ffmpeg
without any deps after you manually installed any required 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
├── ...
这篇关于brew install ffmpeg安装python 3.9的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!