开发者

Has anyone worked on OpenCV2.1 (pyOpenCV) , Python and Maya2010?

I am using

  1. python 2.6.1
  2. corresponding numpy (http://space.dl.sourceforge.net/project/numpy/NumPy/1.5.0/numpy-1.5.0-win32-superpack-python2.6.exe)
  3. corresponding pyOpencv (http://pyopencv.googlecode.com/files/pyopencv-2.1.0.wr1.2.0.win32-py2.6.exe)
  4. 开发者_Python百科

    MAYA2010 (with python 2.6.1)

    import sys
    
    sys.version_info
    
    #Result: (2, 6, 1, 'final', 0)#
    

I tried from pyopencv import * in python IDE it works perfect. I also tried reading and saving file. That also worked perfectly.

But appending path in Maya2010 (sys.path.append('C:\Python26\Lib\site-packages')) for installed python2.6 OR pasting pyopencv and numpy folder to Maya2010 (in required folder : from "C:\Python26\Lib\site-packages" to "D:\Program Files\Autodesk\Maya2010\Python\lib\site-packages") are giving following error messages :

# Error: ImportError: DLL load failed: The specified procedure could not be found. #

on doing : from pyopencv import *

Any help will be appreciated.


You have to do sys.path.append('C:\\Python26\\Lib\\site-packages') with double black-slash (\\) on Windows to specify the path correctly.

import sys
sys.path.append('C:\\Python26\\Lib\\site-packages')
sys.path.append('D:\\Program Files\\Autodesk\\Maya2010\\Python\\lib\\site-packages')
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜