OSX Brew Python "Could not find a version that satisfies the requirement pyopencv"

golmschenk

I'm attempting to install pyopencv. I have installed both Python and OpenCV through Brew. A quick which python/pip shows that I'm using the version of Python installed through Brew as the default. I have already installed numpy through pip. However, when I try to run pip install pyopencv I get back:

Downloading/unpacking pyopencv
  Could not find a version that satisfies the requirement pyopencv (from versions: 2.0.wr1.0.1-demo, 2.0.wr1.0.1, 2.0.wr1.1.0, 2.1.0.wr1.0.0, 2.1.0.wr1.0.1, 2.1.0.wr1.0.2, 2.1.0.wr1.1.0, 2.1.0.wr1.2.0, 2.1.0.wr1.2.0-demo, 2.1.0.wr1.2.0)
Cleaning up...
No distributions matching the version for pyopencv
Storing complete log in /Users/golmschenk/.pip/pip.log

A semi-related question had the same error, but under a different circumstance. The problem here appears to have been with the virtual-environment and they were using the pre-installed version of Python rather than the Brew version.

Any suggestions as to how I might fix this? Thank you much!

Update:

According to this question/solution when a Could not find a version that satisfies the requirement error arises, it's because

pip will only install stable versions as specified by PEP426 by default. If a version cannot be parsed as a compliant PEP426 version then it is assumed to be a pre-release.

This can be worked around using pip install --pre to install pre-release packages. However, upon doing this (or attempting to install pyopencv using easy_install) I run into the error: ImportError: cannot import name Library.

Update 2:

Further research into this new error presented this question/solution. Here the ImportError: cannot import name Library comes from the new version of setuptools having the Library is inside of extension.py. Such that pyopencv should import Library as setuptools.extension.Library and not setuptools.Library. A temporary solution to this would be to manually change this. However, I'd prefer a more appropriate solution if one exists over manually editing 3rd-party packages. Any suggestions? Thanks!

Update 3:

If OpenCV and Python were install correctly through Brew it appears you can use OpenCV in Python simply by importing the cv2 module (as was discovered in the comments). So that solves my problem. However, for others who may actually need pyopencv for something I'll leave this question open.

KobeJohn

Non-answer answer that seemed to work :)

import cv2

Anywhere in the docs that uses the "new" type interface is talking about the C++ (cv2 in python) interface.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

OSX Brew Python "Could not find a version that satisfies the requirement pyopencv"

From Dev

Error installing scipy on osx with brew

From Dev

cmake - osx/mac - openssl brew

From Dev

Error installing scipy on osx with brew

From Dev

MongoClient not found in PHP on Mac OSX using brew

From Dev

jmeter is not downloading using brew in mac osx

From Dev

Error installing rvm on osx mavericks with brew

From Dev

pound conf file location osx brew

From Dev

jmeter is not downloading using brew in mac osx

From Dev

MongoClient not found in PHP on Mac OSX using brew

From Dev

mongodb osx (installed with brew), while db runing commands dont work

From Dev

Brew - Install python3.3

From Dev

Brew - reinstalling python@2

From Dev

brew link boost to homebrew python

From Dev

brew-installed Python not overriding system python

From Dev

Brew fails to install Python: can not symlink

From Dev

Upgrading OpenCV brew formula: Python not loading properly

From Dev

Linking to brew openssl via python virtualenvwrapper

From Dev

Can't get RQuantLib working with brew installed quantlib under osx 10.9.4

From Dev

How can I get iTerm to use the newer version of bash that brew shows? Change a user's shell on OSX

From Dev

Stuck installing MongoDB on Mavericks OSX 10.9 brew install hangs at scons line

From Dev

How do I tell OSX to use matplotlib from brew, rather than default?

From Dev

How do I tell OSX to use matplotlib from brew, rather than default?

From Dev

Is there any alternative way to use qt4 in travis CI for osx (brew removed qt4)

From Java

Homebrew brew doctor warning about /Library/Frameworks/Python.framework, even with brew's Python installed

From Dev

OSX Anaconda default python

From Dev

List directories python OSX

From Dev

python/pip error on osx

From Dev

Right path for python on OSX

Related Related

  1. 1

    OSX Brew Python "Could not find a version that satisfies the requirement pyopencv"

  2. 2

    Error installing scipy on osx with brew

  3. 3

    cmake - osx/mac - openssl brew

  4. 4

    Error installing scipy on osx with brew

  5. 5

    MongoClient not found in PHP on Mac OSX using brew

  6. 6

    jmeter is not downloading using brew in mac osx

  7. 7

    Error installing rvm on osx mavericks with brew

  8. 8

    pound conf file location osx brew

  9. 9

    jmeter is not downloading using brew in mac osx

  10. 10

    MongoClient not found in PHP on Mac OSX using brew

  11. 11

    mongodb osx (installed with brew), while db runing commands dont work

  12. 12

    Brew - Install python3.3

  13. 13

    Brew - reinstalling python@2

  14. 14

    brew link boost to homebrew python

  15. 15

    brew-installed Python not overriding system python

  16. 16

    Brew fails to install Python: can not symlink

  17. 17

    Upgrading OpenCV brew formula: Python not loading properly

  18. 18

    Linking to brew openssl via python virtualenvwrapper

  19. 19

    Can't get RQuantLib working with brew installed quantlib under osx 10.9.4

  20. 20

    How can I get iTerm to use the newer version of bash that brew shows? Change a user's shell on OSX

  21. 21

    Stuck installing MongoDB on Mavericks OSX 10.9 brew install hangs at scons line

  22. 22

    How do I tell OSX to use matplotlib from brew, rather than default?

  23. 23

    How do I tell OSX to use matplotlib from brew, rather than default?

  24. 24

    Is there any alternative way to use qt4 in travis CI for osx (brew removed qt4)

  25. 25

    Homebrew brew doctor warning about /Library/Frameworks/Python.framework, even with brew's Python installed

  26. 26

    OSX Anaconda default python

  27. 27

    List directories python OSX

  28. 28

    python/pip error on osx

  29. 29

    Right path for python on OSX

HotTag

Archive