Ask Your Question
1

How do I install opencv in SageMath 8.8 on Windows 10

asked 2019-08-02 10:24:25 +0200

Swetha gravatar image

I've tried "pip install opencv-python" from SageMath8.8 Shell. But I'm getting the below error

(sage-sh) ssally@SSALLY:Downloads$ pip install opencv_python
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. ERROR: Could not find a version that satisfies the requirement opencv_python (from versions: none) ERROR: No matching distribution found for opencv_python

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2019-08-03 23:11:01 +0200

slelievre gravatar image

updated 2019-08-31 18:33:06 +0200

OpenCV-Python provides Python bindings for OpenCV (free software for computer vision).

To install it you need OpenCV itself, as well as Python, to be installed.

Maybe try the following, in a Sage shell (which, if you installed Sage using the Sage-Windows installer, runs in Cygwin):

apt-cyg install libopencv-devel

Then install opencv-python with the command:

pip install opencv-python
edit flag offensive delete link more

Comments

I did try " pip install opencv_python" and get the same error.

(sage-sh) ssally@SSALLY:~$ pip install opencv_python DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support (https://pip.pypa.io/en/latest/develop...) Collecting opencv_python ERROR: Could not find a version that satisfies the requirement opencv_python (from versions: none) ERROR: No matching distribution found for opencv_python

(sage-sh) ssally@SSALLY:~$ pip install opencv-python ERROR: Could not find a version that satisfies the requirement opencv-python (from versions: none)

Swetha gravatar imageSwetha ( 2019-08-23 04:51:48 +0200 )edit

It appears that OpenCV only supplies pre-built binary wheels on PyPI, and unsurprisingly does not supply one built for Cygwin. This is a problem to ask of the OpenCV developers--at the very least the should also publish the source tarball on PyPI so it can be downloaded and (with any luck) built on platforms that they don't ship wheels for. Alternatively you can see if you can download the source tarball yourself, and use pip to install it manually like pip install <path/to/tarball>.

Iguananaut gravatar imageIguananaut ( 2019-09-04 16:27:30 +0200 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2019-08-02 10:24:25 +0200

Seen: 492 times

Last updated: Aug 31 '19