Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5940595
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T15:59:23+00:00 2026-05-22T15:59:23+00:00

(Step 1) I’m trying to get openCV to run from python on my mac

  • 0

(Step 1)

I’m trying to get openCV to run from python on my mac using the MacPorts install http://opencv.willowgarage.com/wiki/Mac_OS_X_OpenCV_Port, and also trying to follow The Petite Geek’s guide:

sudo port -v install opencv +python26

It runs for about 10 minutes without errors.

(Step 2)

I download ctypes-opencv source and demo files. I navigate to the src directory and run:

sudo python setup.py install

I see like 50 lines almost all of the form: copying ... -> ..., which looks good to me. No errors here.

(Step 3)

I add export DYLD_FALLBACK_LIBRARY_PATH=/opt/local/lib to the end of my ~/.profile.

(Step 4)

I open a new terminal to test my install. From my home folder:

$ python

Python 2.6.2 (r262:71600, Apr 16 2009, 09:17:39) 
[GCC 4.0.1 (Apple Computer, Inc. build 5250)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named cv
>>> 

Does not work.


I read somewhere that opencv installs python bindings with the default version of python for OSX, and I am probably running a non-default version, but this is not actionable information to me.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T15:59:24+00:00Added an answer on May 22, 2026 at 3:59 pm

    I struggled for a while with Python on Mac. Here is how I finally (and easily!) installed it. Remove all the things Python you have on there already. They will probably be located at /Library/Frameworks/Python.Framework and /opt/local/var/macports/software/py26*

    First download Python with Macports.

    sudo port install python27
    

    Then make sure your system is using this version with:

    sudo port select --set python python27
    

    Next install numpy with:

    sudo port install py27-numpy
    

    Now install opencv:

    sudo port install opencv +python27
    

    Now edit your ~/.bash_profile with:

    sudo /Applications/TextEdit.app/Contents/MacOS/TextEdit ~/.bash_profile
    

    or

    open -t ~/.bash_profile
    

    and add the line:

    export PYTHONPATH=/opt/local/var/macports/software/opencv/2.2.0_0+python27/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages:$PYTHONPATH
    

    or where ever your version of the cv.so file is hidden….

    Now restart terminal and try:

    %python
    >>>import cv
    

    I’m using Netbeans for opencv and python and it works really nice. Good luck.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Step Carousel http://www.harrods.com/harrodsstore/ I need a flash or jquery Horizontal Step Carousel which has
I'm one step away from having my Windows .Net application working on Mac OS
Step 1: Loading data via bulk insert from .txt (delimited) file into Table 1
Im just at the step of using the application loader to upload my iphone
I have a three-step process that is entirely reliant upon JavaScript and Ajax to
In a scripting step in a scheduled task in SQL Server Agent 2005, I
Please note: In each step I describe below I'm logged in as the same
Is it possible to step though Classic ASP VB code without Visual interdev or
Just looking for the first step basic solution here that keeps the honest people
Is there an easier way to step through the code than to start the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.