From 235918375de5b4c9ecde9db3b53db97a1ebe1f55 Mon Sep 17 00:00:00 2001 From: Liu Yiqun Date: Mon, 5 Jun 2017 20:55:19 -0700 Subject: [PATCH] Remove the requires of opencv-python. --- python/paddle/utils/image_multiproc.py | 2 +- python/paddle/v2/image.py | 5 ++++- python/setup.py.in | 1 - 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/python/paddle/utils/image_multiproc.py b/python/paddle/utils/image_multiproc.py index 6ce32f7811d..e8db525ff5c 100644 --- a/python/paddle/utils/image_multiproc.py +++ b/python/paddle/utils/image_multiproc.py @@ -12,7 +12,7 @@ from paddle.trainer.config_parser import logger try: import cv2 except ImportError: - logger.warning("OpenCV2 is not installed, using PIL to prcoess") + logger.warning("OpenCV2 is not installed, using PIL to process") cv2 = None __all__ = ["CvTransformer", "PILTransformer", "MultiProcessImageTransformer"] diff --git a/python/paddle/v2/image.py b/python/paddle/v2/image.py index 85ad6984ba0..afcf9a53af4 100644 --- a/python/paddle/v2/image.py +++ b/python/paddle/v2/image.py @@ -3,7 +3,10 @@ try: import cv2 except: print( - "import cv2 error, please install opencv-python: pip install opencv-python" + "import cv2 error, please install python wrapper of opencv using:\n" + " pip install opencv-python\n" + " or\n" + " apt-get install python-opencv\n" ) __all__ = [ diff --git a/python/setup.py.in b/python/setup.py.in index d1c38823080..1afaffd2617 100644 --- a/python/setup.py.in +++ b/python/setup.py.in @@ -19,7 +19,6 @@ setup(name='paddle', "numpy", "protobuf==${PROTOBUF_VERSION}", "matplotlib", - "opencv-python", "rarfile" ], packages=packages, -- GitLab