ylqfp / pyopencv

Automatically exported from code.google.com/p/pyopencv
0 stars 0 forks source link

from pyopencv import * ERROR #10

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,

1. System --> Ubuntu 9.04
2. Downloaded built, installed and tested OpenCV2.1.0
3. Created config.py with details;
"
import os
from glob import glob

# OpenCV 2.x library, to be linked against using bjam+gcc
opencv_dir = "/usr/local"
opencv_include_dirs = [opencv_dir+"/include/opencv"]
opencv_library_dirs = [opencv_dir+"/lib"]
opencv_libraries = ["highgui", "ml", "cvaux", "cv", "cxcore"]
opencv_runtime_library_dirs = []
opencv_runtime_libraries_to_be_bundled = []

# Boost library's source distribution, to be linked against using bjam+gcc 
and bundled with
boost_include_dirs = ["/home/paul/boost_1_41_0"]
boost_library_dirs = []
boost_libraries = []
boost_runtime_library_dirs = []
boost_runtime_libraries_to_be_bundled = []
"
4. Installed numpy1.3
5. Downloaded pyopencv-2.1.0.wr1.0.1.tar.gz , extracted it and ran python 
setup.py build and python setup.py install --> no issues
6. when i start python and run "from pyopencv import *", i get the 
following error from python;

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "pyopencv/__init__.py", line 18, in <module>
    from core import *
  File "pyopencv/core.py", line 35, in <module>
    import numpy as _NP
  File "/usr/local/lib/python2.6/dist-packages/numpy/__init__.py", line 
136, in <module>
    import add_newdocs
  File "/usr/local/lib/python2.6/dist-packages/numpy/add_newdocs.py", line 
9, in <module>
    from numpy.lib import add_newdoc
  File "/usr/local/lib/python2.6/dist-packages/numpy/lib/__init__.py", line 
4, in <module>
    from type_check import *
  File "/usr/local/lib/python2.6/dist-packages/numpy/lib/type_check.py", 
line 8, in <module>
    import numpy.core.numeric as _nx
  File "/usr/local/lib/python2.6/dist-packages/numpy/core/__init__.py", 
line 8, in <module>
    import numerictypes as nt
  File "/usr/local/lib/python2.6/dist-packages/numpy/core/numerictypes.py", 
line 428, in <module>
    _set_up_aliases()
  File "/usr/local/lib/python2.6/dist-packages/numpy/core/numerictypes.py", 
line 411, in _set_up_aliases
    allTypes[alias] = allTypes[t]
KeyError: 'timedelta'

How can i resolve this issue ? Thanks in advance.

Regards,
Paul

Original issue reported on code.google.com by paul.mat...@gmail.com on 17 Apr 2010 at 4:00

GoogleCodeExporter commented 9 years ago
Hi Paul,

I think it is an issue in numpy. If you look at the call stack:

...
  File "pyopencv/core.py", line 35, in <module>
    import numpy as _NP
...

It appears that the issue occurred when PyOpenCV was trying to import numpy. 
Would
you get the same kind of error when you run the command "import numpy" from your
Python interpreter?

Cheers,
Minh-Tri

Original comment by pmtri80@gmail.com on 17 Apr 2010 at 4:18

GoogleCodeExporter commented 9 years ago
I assume you have fixed the problem. I'd like to close this issue. If you still 
have
a problem, please feel free to post it here.

Cheers,
Minh-Tri

Original comment by pmtri80@gmail.com on 21 Apr 2010 at 12:33