![](/img/trans.png)
[英]Best way to install OpenCV on Windows with Enthought Canopy Python?
[英]Enthought Canopy Python and OpenCV
我已經安裝了64位的Enthought Canopy Python 2.7.3,它具有OpenCV 2.4.2。 import cv2
,出現以下錯誤:
>>> import cv2
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: dlopen(/Users/Foo/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/cv2.so, 2): Library not loaded: @executable_path/../Python
Referenced from: /Users/Foo/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/cv2.so
Reason: image not found
這篇文章建議解決方案是運行install_name_tool -change...
但是我不知道要傳遞什么選項,並且對動態庫也不夠熟悉,無法理解手冊頁,因此在這里尋求幫助。
install_name_tool -change @executable_path/../Python $HOME/Library/Enthought/Canopy_64bit/User/Python $HOME/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/cv2.so
感謝原始作者,他還回答了問題鏈接中的完成主題。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.