[MacPorts] #38560: port install opencv +python27 fails
MacPorts
noreply at macports.org
Wed Mar 27 13:46:21 PDT 2013
#38560: port install opencv +python27 fails
---------------------------+--------------------------------
Reporter: johnsankey@… | Owner: macports-tickets@…
Type: defect | Status: closed
Priority: Normal | Milestone:
Component: ports | Version: 2.1.3
Resolution: invalid | Keywords:
Port: |
---------------------------+--------------------------------
Changes (by larryv@…):
* status: new => closed
* resolution: => invalid
Old description:
> 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?
New description:
{{{
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?
--
Comment:
Replying to [ticket:38560 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.
--
Ticket URL: <https://trac.macports.org/ticket/38560#comment:4>
MacPorts <http://www.macports.org/>
Ports system for OS X
More information about the macports-tickets
mailing list