mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-12 14:00:47 +08:00
Fix _libimport when libcv is not available.
This commit is contained in:
@@ -25,9 +25,14 @@ def _import_opencv_lib(which="cv"):
|
||||
if sys.platform.startswith("darwin"):
|
||||
shared_lib = _tryload_macosx(which)
|
||||
elif sys.platform.startswith("linux"):
|
||||
shared_lib = ctypes.CDLL('lib' + which + '.so')
|
||||
libname = 'lib%s.so' % which
|
||||
else:
|
||||
shared_lib = ctypes.CDLL(which + '.dll')
|
||||
libname = 'lib%s.dll' % which
|
||||
|
||||
try:
|
||||
shared_lib = ctypes.CDLL(libname)
|
||||
except OSError:
|
||||
shared_lib = None
|
||||
|
||||
if shared_lib is None:
|
||||
warnings.warn(RuntimeWarning(
|
||||
|
||||
Reference in New Issue
Block a user