我PIP安裝CV2的opencv2蟒蛇的lib蟒蛇CV2沒有找到,但安裝
pip install cv2
我也有使用
brew install opencv
我的機器上安裝了OpenCV的。
是否正確安裝,如果我嘗試運行它,我再次得到
Requirement already satisfied (use --upgrade to upgrade): cv2 in /Library/Python/2.7/site-packages
但是當我嘗試導入它,我得到一個錯誤,那它沒有找到。爲了簡單起見,我要通過我的終端運行python:
Python 2.7.10 (default, Jul 14 2015, 19:46:27)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named cv2
>>>
這不會安裝'opencv',它會安裝[this](https://pypi.python.org/pypi/cv2) – Forge
http://stackoverflow.com/questions/34853220/cannot- import-cv2-in-python-in-osx – Forge
運行'pip show cv2'獲取有關pip包的信息 – Forge