mirror of
https://github.com/wassname/scikit-image.git
synced 2026-06-29 01:59:36 +08:00
23 lines
544 B
Python
23 lines
544 B
Python
import os
|
|
import warnings
|
|
|
|
qt_api = os.environ.get('QT_API')
|
|
|
|
if qt_api is None:
|
|
try:
|
|
import PyQt4
|
|
qt_api = 'pyqt'
|
|
except ImportError:
|
|
try:
|
|
import PySide
|
|
qt_api = 'pyside'
|
|
except ImportError:
|
|
qt_api = None
|
|
# Note that we don't want to raise an error because that would
|
|
# cause the TravisCI build to fail.
|
|
warnings.warn("Could not import PyQt4: ImageViewer not available!")
|
|
|
|
|
|
if qt_api is not None:
|
|
os.environ['QT_API'] = qt_api
|