Opened 11 years ago

Closed 11 years ago

Last modified 7 years ago

#38560 closed defect (worksforme)

port install opencv +python27 fails — at Version 4

Reported by: johnsankey@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.1.3
Keywords: Cc:
Port: opencv

Description (last modified by larryv (Lawrence Velázquez))

sudo port selfupdate
sudo port install python27 py27-numpy py27-scipy
sudo port install opencv +python27

/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/

then contains linkages for numpy and scipy but nothing for opencv so the linkage doesn't work.

.........

I'm told that this fixes the problem with Homebrew: cv2.so and cv.py are located in "/usr/local/Cellar/opencv/2.4.4a/lib/python2.7/site-packages" You need to copy those two files into the python site-packages directory which should be "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/"

I'm also told that this fixes it with Windows: "Copy the file cv2.pyd and paste it into C:\Python27\Lib\site-packages." It is located in C:\Python27\Lib\site-packages\opencv\build\python\2.7

The Macports linkage seems too complex for a quick solution, but is there one?

Change History (1)

comment:4 in reply to:  description Changed 11 years ago by larryv (Lawrence Velázquez)

Description: modified (diff)
Resolution: invalid
Status: newclosed

Replying to johnsankey@…:

/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/

then contains linkages for numpy and scipy but nothing for opencv so the linkage doesn't work.

MacPorts does not install anything into /Library. If numpy and scipy are there, it is because you installed them yourself. MacPorts keeps Python 2.7 packages in ${prefix}/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages.

The Macports linkage seems too complex for a quick solution, but is there one?

The solution (and only configuration we support) is to use MacPorts’ Python 2.7.

Note: See TracTickets for help on using tickets.