Skip to content

Conversation

@Xreki
Copy link
Contributor

@Xreki Xreki commented Jun 6, 2017

On some platform such as Nvidia DRIVE PX 2, we cannot install python wrapper of opencv by pip install opencv-python, which will return

$ pip install opencv-python Collecting opencv-python Could not find a version that satisfies the requirement opencv-python (from versions: ) No matching distribution found for opencv-python

As a result, we cannot install python wrapper of PaddlePaddle (resolve #2305 ).
In fact, we can install opencv through other ways, such as apt-get install python-opencv.

@Xreki Xreki requested review from qingqing01 and reyoung June 6, 2017 07:21
@Xreki
Copy link
Contributor Author

Xreki commented Jun 6, 2017

@qingqing01
As I disable the dependency of opencv-python, and Paddle will copy its own python, we cannot use apt-get install python-opencv to install cv2 to the new python. Thus, unit test test_v2_api will fail because of following error:

71: test test_image.py 71: E 71: ====================================================================== 71: ERROR: test_resize_flip_chw (__main__.Image) 71: ---------------------------------------------------------------------- 71: Traceback (most recent call last): 71: File "test_image.py", line 23, in test_resize_flip_chw 71: im = image.load_image('cat.jpg') 71: File "/home/ubuntu/liuyiqun01/Paddle/python/paddle/v2/tests/.test_env/local/lib/python2.7/site-packages/paddle/v2/image.py", line 139, in load_image 71: im = cv2.imread(file, flag) 71: AttributeError: 'NoneType' object has no attribute 'imread' 71: 71: ---------------------------------------------------------------------- 71: Ran 1 test in 0.001s 71: 71: FAILED (errors=1) 1/1 Test #71: test_v2_api ......................***Failed 219.78 sec

The other two unit tests listed in #2305 , reader_tests and test_ploter, passed.

Copy link
Contributor

@qingqing01 qingqing01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Xreki Oh, I see. LGTM.

@Xreki Xreki merged commit 29a0bc8 into PaddlePaddle:develop Jun 7, 2017
@Xreki Xreki deleted the fix_setup_opencv-python branch October 18, 2017 06:17
chen2016013 pushed a commit to chen2016013/Paddle that referenced this pull request Oct 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants