Skip to content

Instantly share code, notes, and snippets.

@NguyenDa18
Forked from vishwanath79/MacOS_Install_OpenCV.py
Last active May 19, 2018 00:19
Show Gist options
  • Save NguyenDa18/64a47473b56f3717dbdbdbd62cb15556 to your computer and use it in GitHub Desktop.
Save NguyenDa18/64a47473b56f3717dbdbdbd62cb15556 to your computer and use it in GitHub Desktop.

Revisions

  1. NguyenDa18 revised this gist May 19, 2018. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion MacOS_Install_OpenCV.py
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,5 @@
    # Installing OpenCV globally on Anaconda
    - [https://www.codingforentrepreneurs.com/blog/install-opencv-3-for-python-on-mac/](OpenCV Installation)
    - [https://www.codingforentrepreneurs.com/blog/install-opencv-3-for-python-on-mac/]


    # 1. Download and install the latest Anaconda distribution from https://www.continuum.io/downloads#macos
  2. NguyenDa18 revised this gist May 19, 2018. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions MacOS_Install_OpenCV.py
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,6 @@
    # Installing OpenCV globally on Anaconda
    - [https://www.codingforentrepreneurs.com/blog/install-opencv-3-for-python-on-mac/](OpenCV Installation)


    # 1. Download and install the latest Anaconda distribution from https://www.continuum.io/downloads#macos

  3. @vishwanath79 vishwanath79 revised this gist May 4, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion MacOS_Install_OpenCV.py
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,5 @@

    # 1. Download and install the latest Anaconda distriubtion from https://www.continuum.io/downloads#macos
    # 1. Download and install the latest Anaconda distribution from https://www.continuum.io/downloads#macos

    # 2. Create a new Python environment. Make sure you choose python 3.5 as your python version for the virtual environment:

  4. @vishwanath79 vishwanath79 created this gist May 4, 2017.
    32 changes: 32 additions & 0 deletions MacOS_Install_OpenCV.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,32 @@

    # 1. Download and install the latest Anaconda distriubtion from https://www.continuum.io/downloads#macos

    # 2. Create a new Python environment. Make sure you choose python 3.5 as your python version for the virtual environment:

    conda create -n myenv python=3.5

    # 3. Activate the new environment using:

    source activate myenv

    # 4. OpenCV depends on NumPy, which can be installed with:

    conda install numpy

    # 5.Install the anaconda-client command utility to search for the OpenCV binary in Conda:

    conda install anaconda-client

    # 6. Search for OpenCV 3:

    anaconda search -t conda opencv3

    # 7. You will see a few options but choose a package that supports osx-64. For example choose https://conda.anaconda.org/menpo which support osx-64.

    conda install --channel https://conda.anaconda.org/menpo opencv3

    # 8. Test Open CV with below code. It should return the installed Open CV version.

    import cv2
    print("OpenCV version:")
    print(cv2.__version__)