当前位置: 技术问答>linux和unix
Python + OpenCV 问题,求助!!
来源: 互联网 发布时间:2016-08-31
本文导语: 您好! 错误提示: Last login: Fri Jun 4 19:08:00 on ttys000 cd '/Users/junlcn/Desktop/samples/swig_python/' && '/usr/local/bin/pythonw' '/Users/junlcn/Desktop/samples/swig_python/chessboard.py' && echo Exit status: $? && exit 1 true-simple:~ junlcn$ cd...
您好!
错误提示:
Last login: Fri Jun 4 19:08:00 on ttys000
cd '/Users/junlcn/Desktop/samples/swig_python/' && '/usr/local/bin/pythonw' '/Users/junlcn/Desktop/samples/swig_python/chessboard.py' && echo Exit status: $? && exit 1
true-simple:~ junlcn$ cd '/Users/junlcn/Desktop/samples/swig_python/' && '/usr/local/bin/pythonw' '/Users/junlcn/Desktop/samples/swig_python/chessboard.py' && echo Exit status: $? && exit 1
Traceback (most recent call last):
File "/Users/junlcn/Desktop/samples/swig_python/chessboard.py", line 2, in
from opencv.cv import *
ImportError: No module named opencv.cv
我在Mac OS X安装opencv和python以后,尝试运行一个opencv的python例子,出现这个错误提示..
请问如何解决??
谢谢大家!!
错误提示:
Last login: Fri Jun 4 19:08:00 on ttys000
cd '/Users/junlcn/Desktop/samples/swig_python/' && '/usr/local/bin/pythonw' '/Users/junlcn/Desktop/samples/swig_python/chessboard.py' && echo Exit status: $? && exit 1
true-simple:~ junlcn$ cd '/Users/junlcn/Desktop/samples/swig_python/' && '/usr/local/bin/pythonw' '/Users/junlcn/Desktop/samples/swig_python/chessboard.py' && echo Exit status: $? && exit 1
Traceback (most recent call last):
File "/Users/junlcn/Desktop/samples/swig_python/chessboard.py", line 2, in
from opencv.cv import *
ImportError: No module named opencv.cv
我在Mac OS X安装opencv和python以后,尝试运行一个opencv的python例子,出现这个错误提示..
请问如何解决??
谢谢大家!!
|
我给你的连接 你都没看么?
http://www.opencv.org.cn/forum/viewtopic.php?f=1&t=3263&p=11273
在~/.bash_profile中加入一行
就是添加python的模块搜索路径(难道你自己安装到哪儿的你自己都不知道吗)
export PYTHPATH=/usr/lib/python-support/python-opencv/python2.5/opencv:/usr/share/python-support/python-opencv/opencv
然后执行source ~/.bash_profile
http://www.opencv.org.cn/forum/viewtopic.php?f=1&t=3263&p=11273
在~/.bash_profile中加入一行
就是添加python的模块搜索路径(难道你自己安装到哪儿的你自己都不知道吗)
export PYTHPATH=/usr/lib/python-support/python-opencv/python2.5/opencv:/usr/share/python-support/python-opencv/opencv
然后执行source ~/.bash_profile