4 ms·
I tried installing OpenCV2. I needed to get Pip, then I tried to install OpenCV2, but it required a whole bunch of other stuff, which I had to compile, which f
by edent 10y ago
I tried installing OpenCV2. I needed to get Pip, then I tried to install OpenCV2, but it required a whole bunch of other stuff, which I had to compile, which failed.
Was a very frustrating afternoon.
- vram22 10y agoIf on Windows, google Christoph Gohlke's (spelling?) big list of pre-compiled Python modules.
- edent 10y agoHow do I know to do that? Most projects just say "Install OpenCV" or, if you're lucky, give you the step-by-step for doing a pip install. Assuming you already have pip.
- Klathmon 10y agoI remember the first time I sat down to really do something with python, step 1 was setup a virtual environment... I never got to step 2 that week
- vram22 10y ago>How do I know to do that? The answer, unfortunately, is: you don't - at least not from the docs of all libraries you are trying to use. Maybe from some. I found it by googling - so shared it, since it might help you. A less than perfect system, I know. Yes, I remember that installing pip itself was slightly tricky or involved, a while ago. I think they have made it simpler in recent versions, and it also comes pre-installed with some Python versions, likely 3.x and recent versions of 2.x.
- skvark 10y agoPython's packaging system was and is still sometimes somewhat broken. However, it's getting better: compilation related issues are rarer nowadays thanks to the wheel pre-built package format (https://www.python.org/dev/peps/pep-0491/ https://www.python.org/dev/peps/pep-0491/). Another great thing is the manylinux tag (https://www.python.org/dev/peps/pep-0513/ https://www.python.org/dev/peps/pep-0513/) which allows to create portable packages which are compatible with many distributions + contain all required dependencies. For example, I didn't want to compile anymore OpenCV all the time by myself so I made it available as wheel package in PyPI: https://pypi.python.org/pypi/opencv-python https://pypi.python.org/pypi/opencv-python