Ask Your Question

uqarni's profile - activity

2015-07-18 14:17:33 -0600 received badge  Taxonomist
2015-02-04 12:44:37 -0600 received badge  Notable Question (source)
2014-03-25 06:06:31 -0600 received badge  Popular Question (source)
2012-09-20 09:01:14 -0600 asked a question Wrong PYTHONPATH after updating .bash_profile for Mac

Hello there,

Total noob here trying to get OpenCV working on Python through Homebrew. I searched everywhere extensively and couldn't find an answer intelligible to me. 99% of what I have done for this install is blindly follow forum posts, though I am beginning to get an understanding of what all this means.
Installed software:

OS 10.7.4
Xcode 4.4.1
-Command Line Tools
HomeBrew
-Python
-GFortran
-OpenCV

1. write this on first line of .bash_profile and save and restart Mac
export PYTHONPATH="/usr/local/lib/python2.7/site-packages:$PYTHONPATH"

2. open IDLE located at /usr/local/Cellar/python/2.7.3
.>>> import cv

Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
import cv
File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/cv.py", line 1, in <module>
ImportError: No module named cv2.cv

3. Go to Terminal to check PATH and PYTHONPATH
myname-MacBook-Pro:~ myname$ set
.#edited out unnecessary lines PATH=/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin PYTHONPATH=/usr/local/lib/python2.7/site-packages:

1) What does my PATH need to be? I know its comically out of whack from repeated attempts.
2) Why isnt IDLE using this PYTHONPATH?

3. And most importantly, WHAT DO I NEED TO DO OVERALL TO JUST GET AN ICON, ON MY DOCK, THAT I CAN CLICK, THAT OPENS A PROGRAM, WHERE I CAN CODE WONDERFUL PYTHON WITH MAGNIFICENT OPENCV.

Thank you very much for any help you can send my way. I have been attempting to solve this problem for the last 3 days and would be very very appreciative of any help.

2012-09-20 05:30:12 -0600 commented question Help OpenCV Python Mac Install using Homebrew

Based on my extensive searching, anyone who could create a brain-dead friendly page that shows each and every step with brief explanation to go from "nothing installed at all and basic terminal knowledge" to "click app and start coding in Python/OpenCV" would be supremely appreciated. Many who are new to Macs and/or Python and/or Coding sorely need this.

Again, thank you for viewing my post and I apologize for the super-noob questions.

2012-09-20 05:20:27 -0600 asked a question Help OpenCV Python Mac Install using Homebrew

Hi there,

I am new to Mac so forgive my ignorance. Nothing Python, Homebrew, or OpenCV related installed beforehand. XCode 4.4.1 installed, Comand Line Tools installed, running 10.7.4. These are the steps I have (semi-blindly) taken:

$ ruby <(curl -fsSkL raw.github.com/mxcl/homebrew/go) #install homebrew

$ brew install opencv #said Error early on and said I needed to install gfortran

$ brew install gfortran

$ brew install python #i need python so i guess ill do it through homebrew

$ open -e .bash_profile #ive read online i have to "change the path," i can vaguely deduce what this means.

Insert: "export PYTHONPATH="/usr/local/lib/python2.7/site-packages:$PYTHONPATH" without "" into first line. .#above insert done blindly, from online source. no idea why except something to do with "point it in right direction"

Save and exit.

open IDLE under usr/local/Cellar/python/2.7.3/IDLE

type "import cv", it crashes and RESTART's IDLE.

at least im not getting the "no module named cv". but whats going on?

2012-09-19 19:24:59 -0600 received badge  Supporter (source)
2012-09-19 19:24:13 -0600 commented answer Problems installing opencv on mac with python

Hi there, thanks for the response.

Do I have to install Python through Homebrew for this to work? Before or after I install opencv? Any specific version of Python? Once I install Python, how do I get to a point where I can click on an application on my dock that opens that allows me to code in Python using OpenCV?

Sorry for the basic questions- I'm new to Mac and this has been infinitely more complex than on PC.

2012-09-19 09:51:21 -0600 received badge  Student (source)
2012-09-19 08:47:05 -0600 received badge  Editor (source)
2012-09-19 08:46:41 -0600 asked a question Problems installing opencv on mac with python

Hi,

Is there ANYWHERE with a functional step-by-step-by-step guide to doing this? I've tried everything I've found after hours and hours of googling (so please do not link opencv wiki or other top search result), but none of it works! I still get the module doens't exist.

Thank you very much!