在 mac 上安装 caffe “错误:无效选项:--with-python”

Posted

技术标签:

【中文标题】在 mac 上安装 caffe “错误:无效选项:--with-python”【英文标题】:install caffe on mac " Error: invalid option: --with-python" 【发布时间】:2019-02-04 03:13:59 【问题描述】:

当我在mac上安装caffe时:

剩余的依赖,有/没有 Python

# with Python pycaffe needs dependencies built from source

brew install --build-from-source --with-python -vd protobuf
brew install --build-from-source -vd boost boost-python
# without Python the usual installation suffices
brew install protobuf boost

我将第二个粘贴到终端,结果是:

Error: invalid option: --with-python

我找不到任何类似的问题,可以帮助我吗?

【问题讨论】:

也许吧? “自制/自制核心公式不再有安装选项。” github.com/Homebrew/brew/issues/5732 【参考方案1】:

选项已从 Homebrew 核心公式中删除,现在仅存在于水龙头中。请参阅此GitHub issue。使用 python 构建已成为protobuf 的默认行为。

参见formula,第 49-51 行。

chdir "python" do
  system "python3", *Language::Python.setup_install_args(libexec),
                    "--cpp_implementation"

所以运行应该没问题

brew install --build-from-source -vd protobuf

【讨论】:

以上是关于在 mac 上安装 caffe “错误:无效选项:--with-python”的主要内容,如果未能解决你的问题,请参考以下文章

尝试在 mac os 上安装 caffe

mac下配置caffe

caffe:mac10.12安装caffe的步骤

如何MAC上安装tensorflow模块

caffe windows10 vs2013怎么配置

在windows系统上安装caffe