Come Trovare Personale per Eventi: Hostess e Promoter.
Trovare Hostess e Promoter per Eventi: Come Fare.
Scopri come installare OpenCV 2.4.2 con i binding Python su Windows 7 (64 bit) e risolvere i problemi di compatibilità tra Python e CMake. Questo articolo fornisce una guida passo passo per superare le difficoltà di rilevamento delle librerie Python, garantendo un'installazione senza intoppi per il tuo progetto di programmazione.
Trova professionisti vicino a te
Trova professionisti
I'm trying to install the latest version of OpenCV (2.4.2) with Python bindings on Windows 7 (64 bit).
I have both Python 2.7.2 and Python 3.2.2 installed.
I'm using CMake 2.8.8 to generate the Visual Studio solution, but I'm having trouble with finding the right Python libraries.
When I run CMake, it doesn't detect Python 2.7.2, but it does detect Python 3.2.2.
I've tried manually specifying the location of the Python 2.7.2 libraries (e.g. C:\Python27\libs\python27.lib), but then CMake throws an error saying that the library is not a valid Python library.
Any ideas?
A:
It turns out the problem was that I was using the 32-bit version of Python 2.7.2 and the 64-bit version of CMake, so CMake couldn't find the Python libraries.
Once I switched to using the 64-bit version of Python 2.7.2, CMake was able to find the libraries and successfully generate the Visual Studio solution.