Sometimes when I imported a module that was python, it didn't work as expected. At that time, I checked the following items. Write in cv2 as an example.
-[] Check the version of python started by the python command
Linux $ which python
-[] Check the path where the python third party module is located -[] Check the version of the imported module
>>> import cv2
>>> cv2.__version__
'2.4.11'
-[] Check the file name of the imported module
>>> cv2.__file__
'C:\\Python27\\lib\\site-packages\\cv2.pyd'
You can check if an unintended version is running by doing such a check.
Further necessary check items --Conditions when building the library --Are you using OpenMP? --Are you using Cuda? --Other build conditions
>>> print cv2.getBuildInformation()
General configuration for OpenCV 2.4.11 =====================================
Version control: 2.4.11
Platform:
Host: Windows 6.1 AMD64
CMake: 2.8.11.2
CMake generator: Visual Studio 10
CMake build tool: C:/Windows/Microsoft.NET/Framework/v4.0.30319/MSBuild.exe
MSVC: 1600
C/C++:
Built as dynamic libs?: NO
(Omitted below)
Other third-party libraries:
Use IPP: NO
Use Eigen: NO
Use TBB: NO
Use OpenMP: NO
Use GCD NO
Use Concurrency YES
Use C=: NO
Use Cuda: NO
Use OpenCL: YES
Recommended Posts