如何离线在Anaconda3中安装OpenCV3?

How to install OpenCV3 in Anaconda3 offline?

我尝试使用以下命令在 Anaconda 中为 Python-3.5 安装 OpenCV

conda install -c https://conda.binstar.org/menpo opencv3

下载文件需要很长时间。看起来我的下载加速器在这方面做得更好。文件位置在

https://anaconda.org/menpo/opencv3/3.1.0/download/osx-64/opencv3-3.1.0-py35_0.tar.bz2

有没有办法在给定 opencv3-3.1.0-py35_0.tar.bz2 文件的情况下进行相同的离线安装?

如果你想直接安装包文件那么简单

conda install PATH_TO_FILE/opencv3-3.1.0-py35_0.tar.bz2

当然,PATH_TO_FILE 文件只是文件的路径。请注意此处 conda install 中的警告:

conda can also be called with a list of explicit conda package filenames (e.g. ./lxml-3.2.0-py27_0.tar.bz2). Using conda in this mode implies the --force option, and should likewise be used with great caution. Explicit filenames and package specifications cannot be mixed in a single command.

您还可以使用 --offline 参数来确保您没有连接到互联网。