Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the requires of opencv-python. #2394

Merged
merged 3 commits into from
Jun 7, 2017

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 reyoung and qingqing01 June 6, 2017 07:21
@Xreki Xreki added this to In Progress in Embedded and Mobile Deployment Jun 6, 2017
@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 moved this from In Progress to Build System in Embedded and Mobile Deployment Jun 7, 2017
@Xreki Xreki deleted the fix_setup_opencv-python branch October 18, 2017 06:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Embedded and Mobile Deployment
Build System & Build Optimize
Development

Successfully merging this pull request may close these issues.

Unit test test_v2_api, reader_tests, test_ploter failed on NVIDIA DRIVE PX 2.
2 participants