Search code examples
pythonopencvinstallationanacondamenpo

How to install OpenCV3 in Anaconda3 offline?


I tried to install OpenCV for Python-3.5 in Anaconda using the following command

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

This is taking a really long time to download the file. It seems like my download accelerator is much better at doing this. The file location is at

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

Is there a way do the same installation offline given the opencv3-3.1.0-py35_0.tar.bz2 file?


Solution

  • If you want to install the package file directly then simply do

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

    Where, of course, PATH_TO_FILE to the file is just the path to the file. Note the warning in the conda install here:

    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.

    You can also use the --offline argument to make sure you don't connect to the internet.