I have installed Python 2.7
, but when I try to generate the OpenCV 2.3.1
project Makefiles using CMake 2.8
, I get the following message. I am running Windows 7 x86 and using Visual Studio 10.
Could NOT find PythonInterp (missing: PYTHON_EXECUTABLE)
Could NOT find PythonLibs (missing: PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS)
I have followed the guide provided at this link.
Start the Python shell by typing python3 and then hit enter. You will be inside the Python shell where you can execute your Python code. Import the cv2 package which is the name of the OpenCV module. Type “import cv2” and hit enter.
By default OpenCV will be installed to the /usr/local directory, all files will be copied to following locations: /usr/local/bin - executable files. /usr/local/lib - libraries (.
Yes, this also worked for me.
Check advanced, then manually set the values for the three variables.
In my case:
PYTHON_EXECUTABLE = .../python.exe
PYTHON_INCLUDE_DIR = .../include
PYTHON_LIBRARY = .../python26.lib
Tested with PythonPortable on Windows. (so, no installation required)
Did you install Python in the normal place ( c:\Python2.7 on windows)
Use the Cmake-gui select advanced and it will allow you to set all the values directly
Check the architecture of your installed Python, in my case for example I had Python x86_64 package installed but Cmake was looking for x86. So I believe this Cmake error message has a great potential of improvement.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With