I'm using pycharm. I created a virtual environment to use and when I tried to install the opencv library, I got an error message.
I am using the pip command to install openCV:
Command:pip install opencv-python
This the the error message that appears when I use the command:
Error: -
Collecting opencv-python
Using cached https://files.pythonhosted.org/packages/e0/6f/237b730227927c15a68ec831a51bc83837bb65d54bf9651c08b474201b9a/opencv-python-4.4.0.40.tar.gz
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... done
Requirement already satisfied: numpy>=1.17.3 in f:\python\rio python\project rio\reco_env\lib\site-packages (from opencv-python) (1.19.1)
Building wheels for collected packages: opencv-python
Building wheel for opencv-python (PEP 517) ... error
Complete output from command "F:\Python\Rio Python\Project Rio\Reco_env\Scripts\python.exe" "F:\Python\Rio Python\Project Rio\Reco_env\lib\site-packages\pip-19.0.3-py3.8.egg\pip\_vendor\pep517\_in_process.py" build_wheel C:\Users\Rio\AppData\Local\Temp\tmpew_pbwjp:
Not searching for unused variables given on the command line.
CMake Error: CMake was unable to find a build program corresponding to "Ninja". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
-- Configuring incomplete, errors occurred!
See also "C:/Users/Rio/AppData/Local/Temp/pip-install-gyo_26q6/opencv-python/_cmake_test_compile/build/CMakeFiles/CMakeOutput.log".
Not searching for unused variables given on the command line.
CMake Error at CMakeLists.txt:2 (PROJECT):
Generator
Visual Studio 15 2017
could not find any instance of Visual Studio.
-- Configuring incomplete, errors occurred!
See also "C:/Users/Rio/AppData/Local/Temp/pip-install-gyo_26q6/opencv-python/_cmake_test_compile/build/CMakeFiles/CMakeOutput.log".
Not searching for unused variables given on the command line.
-- The C compiler identification is unknown
CMake Error at CMakeLists.txt:3 (ENABLE_LANGUAGE):
The CMAKE_C_COMPILER:
cl
is not a full path and was not found in the PATH.
To use the NMake generator with Visual C++, cmake must be run from a shell
that can use the compiler cl from the command line. This environment is
unable to invoke the cl compiler. To fix this problem, run cmake from the
Visual Studio Command Prompt (vcvarsall.bat).
Tell CMake where to find the compiler by setting either the environment
variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
the compiler, or to the compiler name if it is in the PATH.
-- Configuring incomplete, errors occurred!
See also "C:/Users/Rio/AppData/Local/Temp/pip-install-gyo_26q6/opencv-python/_cmake_test_compile/build/CMakeFiles/CMakeOutput.log".
See also "C:/Users/Rio/AppData/Local/Temp/pip-install-gyo_26q6/opencv-python/_cmake_test_compile/build/CMakeFiles/CMakeError.log".
Not searching for unused variables given on the command line.
-- The C compiler identification is unknown
CMake Error at CMakeLists.txt:3 (ENABLE_LANGUAGE):
The CMAKE_C_COMPILER:
cl
is not a full path and was not found in the PATH.
To use the JOM generator with Visual C++, cmake must be run from a shell
that can use the compiler cl from the command line. This environment is
unable to invoke the cl compiler. To fix this problem, run cmake from the
Visual Studio Command Prompt (vcvarsall.bat).
Tell CMake where to find the compiler by setting either the environment
variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
the compiler, or to the compiler name if it is in the PATH.
-- Configuring incomplete, errors occurred!
See also "C:/Users/Rio/AppData/Local/Temp/pip-install-gyo_26q6/opencv-python/_cmake_test_compile/build/CMakeFiles/CMakeOutput.log".
See also "C:/Users/Rio/AppData/Local/Temp/pip-install-gyo_26q6/opencv-python/_cmake_test_compile/build/CMakeFiles/CMakeError.log".
--------------------------------------------------------------------------------
-- Trying "Ninja (Visual Studio 15 2017 v141)" generator
--------------------------------
---------------------------
----------------------
-----------------
------------
-------
--
--
-------
------------
-----------------
----------------------
---------------------------
--------------------------------
-- Trying "Ninja (Visual Studio 15 2017 v141)" generator - failure
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
-- Trying "Visual Studio 15 2017 v141" generator
--------------------------------
---------------------------
----------------------
-----------------
------------
-------
--
--
-------
------------
-----------------
----------------------
---------------------------
--------------------------------
-- Trying "Visual Studio 15 2017 v141" generator - failure
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
-- Trying "NMake Makefiles (Visual Studio 15 2017 v141)" generator
--------------------------------
---------------------------
----------------------
-----------------
------------
-------
--
--
-------
------------
-----------------
----------------------
---------------------------
--------------------------------
-- Trying "NMake Makefiles (Visual Studio 15 2017 v141)" generator - failure
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
-- Trying "NMake Makefiles JOM (Visual Studio 15 2017 v141)" generator
--------------------------------
---------------------------
----------------------
-----------------
------------
-------
--
--
-------
------------
-----------------
----------------------
---------------------------
--------------------------------
-- Trying "NMake Makefiles JOM (Visual Studio 15 2017 v141)" generator - failure
--------------------------------------------------------------------------------
********************************************************************************
scikit-build could not get a working generator for your system. Aborting build.
Building windows wheels for Python 3.8 requires Microsoft Visual Studio 2017.
Get it with "Visual Studio 2017":
https://visualstudio.microsoft.com/vs/
********************************************************************************
----------------------------------------
Failed building wheel for opencv-python
Running setup.py clean for opencv-python
Failed to build opencv-python
Could not build wheels for opencv-python which use PEP 517 and cannot be installed directly
I also installed Visual Studio Community 2019, and tried with Visual Studio Community 2017, but I am still having the same issue.
Does anyone know how to solve this please?
solution: pip3 install --upgrade pip setuptools wheel
Install anaconda...I also had the same issue...But anaconda just paves it off
I believe your issue is happening because Cmake cannot find the cl compiler in your system's path. Try to locate it depending on your visual studio installed and then add it your system's path.
This is an example of the path where the cl.exe can be found. Now mine is 14.0, but yours might be different.
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin
I tried all the solutions and none of them solved my issue. Firstly, I was trying to download opencv-python-headless from my company's requirements file. Although, every time I executed the install operation it failed and gave this error.
conda install -c fastai opencv-python-headless=4.5.2.54
I separately installed opencv-python-headless like above and this really solved my issue, maybe it might be useful for too. So, maybe instead of pip, conda might be the solution.
Related
I calculate the zeros and poles of a system with control.StateSpace. In the following I want to use control.pzmap to display the result but the last doesn´t work. I can print sys and it seems okay but not as parameter of control.pzmap.
Can someone pls help me?
import numpy as np
import control
from OMPython import ModelicaSystem
import matplotlib.pyplot as plt
from help_fkt import delete_OM_files
#from numpy import pi as pi
L=0.1
R=80
C=3.3e-6
A= [[0,1/C],
[-1/L, -R/L]]
B=[[0],[1/L]]
C=[[1,0],[0,1],[-1,0]]
D= [[0],[0],[1]]
print(A)
print(B)
print(C)
print(D)
fig=plt.figure(1, figsize=(10,6)); fig.clf()
plt.show()
sys=control.StateSpace(A,B,C,D) #calculation of poles and zeros of the given system
print(sys)
a=sys.pole()
print(a)
control.pzmap(sys) #should make a diagram of poles and zeros, but doesn't work
plt.grid()
This is the error:
File "C:\anaconda3\envs\modsim\lib\site-packages\control\statesp.py",
line 575, in zero
from slycot import ab08nd
ModuleNotFoundError: No module named 'slycot'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File
"C:\Users\johan\OneDrive\Desktop\Studium\SimulationundModellbildung\Lösungen\LSG_Carlos\A7.py",
line 44, in
control.pzmap(sys)
File "C:\anaconda3\envs\modsim\lib\site-packages\control\pzmap.py",
line 91, in pzmap
zeros = sys.zero()
File
"C:\anaconda3\envs\modsim\lib\site-packages\control\statesp.py", line
587, in zero
raise NotImplementedError("StateSpace.zero only supports "
NotImplementedError: StateSpace.zero only supports systems with the same number of inputs as outputs.
Error when I try to install slycot:
(base) C:\Users\johan>pip install slycot Collecting slycot Using cached slycot-0.4.0.0.tar.gz (1.5 MB) Installing build dependencies ... done Getting requirements to build wheel ... done Preparing wheel metadata ... done Requirement already satisfied: numpy in c:\anaconda3\lib\site-packages (from slycot) (1.18.1) Building wheels for collected packages: slycot Building wheel for slycot (PEP 517) ... error ERROR: Command errored out with exit status 1: command: 'c:\anaconda3\python.exe' 'c:\anaconda3\lib\site-packages\pip_vendor\pep517_in_process.py' build_wheel 'C:\Users\johan\AppData\Local\Temp\tmpsxxs_crf' cwd: C:\Users\johan\AppData\Local\Temp\pip-install-r2r2i4rs\slycot Complete output (56 lines): Not searching for unused variables given on the command line. -- The C compiler identification is unknown CMake Error at CMakeLists.txt:3 (ENABLE_LANGUAGE): The CMAKE_C_COMPILER: cl is not a full path and was not found in the PATH. To use the NMake generator with Visual C++, cmake must be run from a shell that can use the compiler cl from the command line. This environment is unable to invoke the cl compiler. To fix this problem, run cmake from the Visual Studio Command Prompt (vcvarsall.bat). Tell CMake where to find the compiler by setting either the environment variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to the compiler, or to the compiler name if it is in the PATH. -- Configuring incomplete, errors occurred! See also "C:/Users/johan/AppData/Local/Temp/pip-install-r2r2i4rs/slycot/_cmake_test_compile/build/CMakeFiles/CMakeOutput.log". See also "C:/Users/johan/AppData/Local/Temp/pip-install-r2r2i4rs/slycot/_cmake_test_compile/build/CMakeFiles/CMakeError.log". FC ('-DCMAKE_Fortran_COMPILER=', 'c:/anaconda3/Library/bin/flang.exe') F2PY ('-DF2PY_EXECUTABLE=', 'c:/anaconda3/Scripts/f2py.exe') NUMPY_INCLUDE ('-DNumPy_INCLUDE_DIR=', 'c:/anaconda3/Include') ['-DSLYCOT_VERSION:STRING=0.4.0', '-DGIT_REVISION:STRING=ac0944b363a6cfcc0c3d5128cdd484d74173aa3b', '-DISRELEASE:STRING=True', '-DFULL_VERSION=0.4.0.gitac0944b', '-GNMake Makefiles', '-DCMAKE_Fortran_COMPILER=c:/anaconda3/Library/bin/flang.exe', '-DF2PY_EXECUTABLE=c:/anaconda3/Scripts/f2py.exe', '-DNumPy_INCLUDE_DIR=c:/anaconda3/Include', '-DCMAKE_Fortran_SIMULATE_VERSION=5.0.0', '-DCMAKE_Fortran_COMPILER_ID=Flang', '-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON'] -------------------------------------------------------------------------------- -- Trying "NMake Makefiles (Visual Studio 15 2017 Win64 v141)" generator -------------------------------- --------------------------- ---------------------- ----------------- ------------ ------- -- -- ------- ------------ ----------------- ---------------------- --------------------------- -------------------------------- -- Trying "NMake Makefiles (Visual Studio 15 2017 Win64 v141)" generator - failure -------------------------------------------------------------------------------- ******************************************************************************** scikit-build could not get a working generator for your system. Aborting build. Building windows wheels for Python 3.7 requires Microsoft Visual Studio 2017. Get it with "Visual Studio 2017": https://visualstudio.microsoft.com/vs/ ******************************************************************************** ---------------------------------------- ERROR: Failed building wheel for slycot Failed to build slycot ERROR: Could not build wheels for slycot which use PEP 517 and cannot be installed directly WARNING: You are using pip version 20.2.4; however, version 20.3.3 is available. You should consider upgrading via the 'c:\anaconda3\python.exe -m pip install --upgrade pip' command.
Ok, I've installed anaconda environment (just for you ;) ) to pinpoint the problem. It seems thats not just your machine and using the package that you use is a little difficult then trivial.
It seems that you have two problems.
First problem is, one of the packages you use depends on slycot. But slycot requires some compiling work on the background in order to install itself. Compiling the files on your pc requires having a compiler installed on your computer. Preferred compiler for this package is Visual Studio 2017. If you check the error message carefully, it is asking you to download and install it from this page.
Second problem is something I am not familiar with. It is complaining that the input space has to be the same size with the output space.
NotImplementedError: StateSpace.zero only supports systems with the same number of inputs as outputs.
But then again, this might be caused by the first problem.
So, let's install the VS 2017 first and see if that resolves it. If not, we'll see if anything has changed and proceed from there.
I am trying to install opencv-python on windows but after running the pip install opencv-python command I keep geting the following error: ERROR: Could not build wheels for opencv-python which use PEP 517 and cannot be installed directly.
I'm using python version 3.9.0 and pip version pip 20.2.4.
I've tried upgrading both my pip version as well as running pip install --upgrade pip setuptools wheel, as found on similar threads, but none of these seems to solve the issue.
The full console output after running the command:
Collecting opencv-python
Downloading opencv-python-4.4.0.44.tar.gz (88.9 MB)
|████████████████████████████████| 88.9 MB 3.3 MB/s
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... done
Collecting numpy>=1.17.3
Downloading numpy-1.19.2.zip (7.3 MB)
|████████████████████████████████| 7.3 MB 6.4 MB/s
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... done
Building wheels for collected packages: opencv-python, numpy
Building wheel for opencv-python (PEP 517) ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\david\appdata\local\programs\python\python39\python.exe' 'c:\users\david\appdata\local\programs\python\python39\lib\site-packages\pip\_vendor\pep517\_in_process.py' build_wheel 'C:\Users\David\AppData\Local\Temp\tmpl1finc77'
cwd: C:\Users\David\AppData\Local\Temp\pip-install-gfwb0hqn\opencv-python
Complete output (153 lines):
Not searching for unused variables given on the command line.
CMake Error: CMake was unable to find a build program corresponding to "Ninja". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
-- Configuring incomplete, errors occurred!
See also "C:/Users/David/AppData/Local/Temp/pip-install-gfwb0hqn/opencv-python/_cmake_test_compile/build/CMakeFiles/CMakeOutput.log".
Not searching for unused variables given on the command line.
CMake Error at CMakeLists.txt:2 (PROJECT):
Generator
Visual Studio 15 2017 Win64
could not find any instance of Visual Studio.
-- Configuring incomplete, errors occurred!
See also "C:/Users/David/AppData/Local/Temp/pip-install-gfwb0hqn/opencv-python/_cmake_test_compile/build/CMakeFiles/CMakeOutput.log".
Not searching for unused variables given on the command line.
-- The C compiler identification is unknown
CMake Error at CMakeLists.txt:3 (ENABLE_LANGUAGE):
The CMAKE_C_COMPILER:
cl
is not a full path and was not found in the PATH.
To use the NMake generator with Visual C++, cmake must be run from a shell
that can use the compiler cl from the command line. This environment is
unable to invoke the cl compiler. To fix this problem, run cmake from the
Visual Studio Command Prompt (vcvarsall.bat).
Tell CMake where to find the compiler by setting either the environment
variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
the compiler, or to the compiler name if it is in the PATH.
-- Configuring incomplete, errors occurred!
See also "C:/Users/David/AppData/Local/Temp/pip-install-gfwb0hqn/opencv-python/_cmake_test_compile/build/CMakeFiles/CMakeOutput.log".
See also "C:/Users/David/AppData/Local/Temp/pip-install-gfwb0hqn/opencv-python/_cmake_test_compile/build/CMakeFiles/CMakeError.log".
Not searching for unused variables given on the command line.
-- The C compiler identification is unknown
CMake Error at CMakeLists.txt:3 (ENABLE_LANGUAGE):
The CMAKE_C_COMPILER:
cl
is not a full path and was not found in the PATH.
To use the JOM generator with Visual C++, cmake must be run from a shell
that can use the compiler cl from the command line. This environment is
unable to invoke the cl compiler. To fix this problem, run cmake from the
Visual Studio Command Prompt (vcvarsall.bat).
Tell CMake where to find the compiler by setting either the environment
variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
the compiler, or to the compiler name if it is in the PATH.
-- Configuring incomplete, errors occurred!
See also "C:/Users/David/AppData/Local/Temp/pip-install-gfwb0hqn/opencv-python/_cmake_test_compile/build/CMakeFiles/CMakeOutput.log".
See also "C:/Users/David/AppData/Local/Temp/pip-install-gfwb0hqn/opencv-python/_cmake_test_compile/build/CMakeFiles/CMakeError.log".
--------------------------------------------------------------------------------
-- Trying "Ninja (Visual Studio 15 2017 Win64 v141)" generator
--------------------------------
---------------------------
----------------------
-----------------
------------
-------
--
--
-------
------------
-----------------
----------------------
---------------------------
--------------------------------
-- Trying "Ninja (Visual Studio 15 2017 Win64 v141)" generator - failure
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
-- Trying "Visual Studio 15 2017 Win64 v141" generator
--------------------------------
---------------------------
----------------------
-----------------
------------
-------
--
--
-------
------------
-----------------
----------------------
---------------------------
--------------------------------
-- Trying "Visual Studio 15 2017 Win64 v141" generator - failure
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
-- Trying "NMake Makefiles (Visual Studio 15 2017 Win64 v141)" generator
--------------------------------
---------------------------
----------------------
-----------------
------------
-------
--
--
-------
------------
-----------------
----------------------
---------------------------
--------------------------------
-- Trying "NMake Makefiles (Visual Studio 15 2017 Win64 v141)" generator - failure
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
-- Trying "NMake Makefiles JOM (Visual Studio 15 2017 Win64 v141)" generator
--------------------------------
---------------------------
----------------------
-----------------
------------
-------
--
--
-------
------------
-----------------
----------------------
---------------------------
--------------------------------
-- Trying "NMake Makefiles JOM (Visual Studio 15 2017 Win64 v141)" generator - failure
--------------------------------------------------------------------------------
********************************************************************************
scikit-build could not get a working generator for your system. Aborting build.
Building windows wheels for Python 3.9 requires Microsoft Visual Studio 2017.
Get it with "Visual Studio 2017":
https://visualstudio.microsoft.com/vs/
********************************************************************************
----------------------------------------
ERROR: Failed building wheel for opencv-python
Building wheel for numpy (PEP 517) ... done
Created wheel for numpy: filename=numpy-1.19.2-cp39-cp39-win_amd64.whl size=4816060 sha256=18bd09a9c5e107a2e44f8466057d0b423a244fb84949a6d5a6d88534a58e1e4a
Stored in directory: C:\Users\David\AppData\Local\Temp\pip-ephem-wheel-cache-v6mmdzxn\wheels\a3\17\dd\f2dba23a35bb6008732772ccfb13d3d0e537fbc6919ce6862b
Successfully built numpy
Failed to build opencv-python
ERROR: Could not build wheels for opencv-python which use PEP 517 and cannot be installed directly
Any kind of help would be appreciated, thanks!
There are no pre-built Python 3.9 binary wheels yet for opencv-python. To compile from source, you must install build tools (Visual Studio 15 2017) as indicated by the error:
scikit-build could not get a working generator for your system. Aborting build.
Building windows wheels for Python 3.9 requires Microsoft Visual Studio 2017.
Get it with "Visual Studio 2017":
https://visualstudio.microsoft.com/vs/
opencv-python Python 3.9 wheel tracking issue: https://github.com/skvark/opencv-python/issues/382
I was trying to install opencv-python in visual studio (with Visual Studio 2019 installed) but kept coming up with this error. I have tried most of the methods that were previously posted regarding this PEP517 error but i am still getting errors. Appreciate if someone could help me out here as i am just a beginner coder. Thanks alot in advance.
Below is the error code:
$ pip install opencv-python
Collecting opencv-python
Using cached opencv-python-4.4.0.44.tar.gz (88.9 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... done
Requirement already satisfied: numpy>=1.17.3 in c:\python\lib\site-packages (from opencv-python) (1.19.2)
Building wheels for collected packages: opencv-python
Building wheel for opencv-python (PEP 517) ... error
ERROR: Command errored out with exit status 1:
command: 'c:\python\python.exe' 'c:\python\lib\site-packages\pip\_vendor\pep517\_in_process.py' build_wheel 'C:\Users\Austen\AppData\Local\Temp\tmp6zo4yrsx'
cwd: C:\Users\Austen\AppData\Local\Temp\pip-install-tcb_5anh\opencv-python
Complete output (153 lines):
Not searching for unused variables given on the command line.
CMake Error: CMake was unable to find a build program corresponding to "Ninja". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
-- Configuring incomplete, errors occurred!
See also "C:/Users/Austen/AppData/Local/Temp/pip-install-tcb_5anh/opencv-python/_cmake_test_compile/build/CMakeFiles/CMakeOutput.log".
Not searching for unused variables given on the command line.
CMake Error at CMakeLists.txt:2 (PROJECT):
Generator
Visual Studio 15 2017 Win64
could not find any instance of Visual Studio.
-- Configuring incomplete, errors occurred!
See also "C:/Users/Austen/AppData/Local/Temp/pip-install-tcb_5anh/opencv-python/_cmake_test_compile/build/CMakeFiles/CMakeOutput.log".
Not searching for unused variables given on the command line.
-- The C compiler identification is unknown
CMake Error at CMakeLists.txt:3 (ENABLE_LANGUAGE):
The CMAKE_C_COMPILER:
cl
is not a full path and was not found in the PATH.
To use the NMake generator with Visual C++, cmake must be run from a shell
that can use the compiler cl from the command line. This environment is
unable to invoke the cl compiler. To fix this problem, run cmake from the
Visual Studio Command Prompt (vcvarsall.bat).
Tell CMake where to find the compiler by setting either the environment
variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
the compiler, or to the compiler name if it is in the PATH.
********************************************************************************
----------------------------------------
ERROR: Failed building wheel for opencv-python
Failed to build opencv-python
ERROR: Could not build wheels for opencv-python which use PEP 517 and cannot be installed directly
I have successfully resolved this error issue. There are two methods of going about it, you can use either:
Downgrading Python 3.9 to Python 3.8
Use conda instead of pip (if you have python 3.9 installed and don't want to downgrade)
Cheers!
I need help to install OpenCv with Pip.
Everytime I type the pip install opencv-python command in the command prompt, I get this error :
C:\Users\me>pip install opencv-python
Collecting opencv-python
Using cached opencv-python-4.4.0.44.tar.gz (88.9 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... done
Requirement already satisfied: numpy>=1.17.3 in e:\python\lib\site-packages (from opencv-python) (1.19.2)
Building wheels for collected packages: opencv-python
Building wheel for opencv-python (PEP 517) ... error
ERROR: Command errored out with exit status 1:
command: 'e:\python\python.exe' 'e:\python\lib\site-packages\pip\_vendor\pep517\_in_process.py' build_wheel 'C:\Users\me\AppData\Local\Temp\tmphs6y6kyz'
cwd: C:\Users\me\AppData\Local\Temp\pip-install-l8x74op7\opencv-python
Complete output (153 lines):
Not searching for unused variables given on the command line.
CMake Error: CMake was unable to find a build program corresponding to "Ninja". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
-- Configuring incomplete, errors occurred!
See also "C:/Users/me/AppData/Local/Temp/pip-install-l8x74op7/opencv-python/_cmake_test_compile/build/CMakeFiles/CMakeOutput.log".
Not searching for unused variables given on the command line.
CMake Error at CMakeLists.txt:2 (PROJECT):
Generator
Visual Studio 15 2017 Win64
could not find any instance of Visual Studio.
-- Configuring incomplete, errors occurred!
See also "C:/Users/me/AppData/Local/Temp/pip-install-l8x74op7/opencv-python/_cmake_test_compile/build/CMakeFiles/CMakeOutput.log".
Not searching for unused variables given on the command line.
-- The C compiler identification is unknown
CMake Error at CMakeLists.txt:3 (ENABLE_LANGUAGE):
The CMAKE_C_COMPILER:
cl
is not a full path and was not found in the PATH.
To use the NMake generator with Visual C++, cmake must be run from a shell
that can use the compiler cl from the command line. This environment is
unable to invoke the cl compiler. To fix this problem, run cmake from the
Visual Studio Command Prompt (vcvarsall.bat).
Tell CMake where to find the compiler by setting either the environment
variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
the compiler, or to the compiler name if it is in the PATH.
-- Configuring incomplete, errors occurred!
See also "C:/Users/me/AppData/Local/Temp/pip-install-l8x74op7/opencv-python/_cmake_test_compile/build/CMakeFiles/CMakeOutput.log".
See also "C:/Users/me/AppData/Local/Temp/pip-install-l8x74op7/opencv-python/_cmake_test_compile/build/CMakeFiles/CMakeError.log".
Not searching for unused variables given on the command line.
-- The C compiler identification is unknown
CMake Error at CMakeLists.txt:3 (ENABLE_LANGUAGE):
The CMAKE_C_COMPILER:
cl
is not a full path and was not found in the PATH.
To use the JOM generator with Visual C++, cmake must be run from a shell
that can use the compiler cl from the command line. This environment is
unable to invoke the cl compiler. To fix this problem, run cmake from the
Visual Studio Command Prompt (vcvarsall.bat).
Tell CMake where to find the compiler by setting either the environment
variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
the compiler, or to the compiler name if it is in the PATH.
-- Configuring incomplete, errors occurred!
See also "C:/Users/me/AppData/Local/Temp/pip-install-l8x74op7/opencv-python/_cmake_test_compile/build/CMakeFiles/CMakeOutput.log".
See also "C:/Users/me/AppData/Local/Temp/pip-install-l8x74op7/opencv-python/_cmake_test_compile/build/CMakeFiles/CMakeError.log".
--------------------------------------------------------------------------------
-- Trying "NMake Makefiles JOM (Visual Studio 15 2017 Win64 v141)" generator
--------------------------------
---------------------------
----------------------
-----------------
------------
-------
--
--
-------
------------
-----------------
----------------------
---------------------------
--------------------------------
-- Trying "NMake Makefiles JOM (Visual Studio 15 2017 Win64 v141)" generator - failure
--------------------------------------------------------------------------------
********************************************************************************
scikit-build could not get a working generator for your system. Aborting build.
Building windows wheels for Python 3.9 requires Microsoft Visual Studio 2017.
Get it with "Visual Studio 2017":
https://visualstudio.microsoft.com/vs/
********************************************************************************
----------------------------------------
ERROR: Failed building wheel for opencv-python
Failed to build opencv-python
ERROR: Could not build wheels for opencv-python which use PEP 517 and cannot be installed directly
If there are unoffical wheels available, then the easiest way to install it would be.
pip install pipwin
then
pipwin install opencv-python
I tried to install dlib: python install dlib
cmake installed using : python install cmake (cmake path also set as system var)
visual studio 14 2015 has been installed in my system.
The system is: Windows - 6.1.7601 - AMD64
Building wheel for dlib (setup.py) ... error
ERROR: Complete output from command 'c:\personal\study material\python\python.
-- Building for: Visual Studio 14 2015
CMake Error in CMakeLists.txt:
Failed to run MSBuild command:
C:/Program Files (x86)/MSBuild/14.0/bin/MSBuild.exe
to get the value of VCTargetsPath:
Microsoft (R) Build Engine version 14.0.25420.1
Copyright (C) Microsoft Corporation. All rights reserved.
Build started 02-08-2019 14:37:03.
Project "C:\Users\user_name\AppData\Local\Temp\pip-install-xqz7oflh\dlib\bu
ild\temp.win-amd64-3.7\Release\CMakeFiles\3.14.4\VCTargetsPath.vcxproj" on node
1 (default targets).
C:\Users\user_name\AppData\Local\Temp\pip-install-xqz7oflh\dlib\build\temp.
win-amd64-3.7\Release\CMakeFiles\3.14.4\VCTargetsPath.vcxproj(14,2): error MSB40
19: The imported project "C:\Personal\Study Material\Python\dlib-19.6\build\CMak
eFiles\3.14.4\Microsoft.Cpp.Default.props" was not found. Confirm that the path
in the <Import> declaration is correct, and that the file exists on disk.
Done Building Project "C:\Users\user_name\AppData\Local\Temp\pip-install-xq
z7oflh\dlib\build\temp.win-amd64-3.7\Release\CMakeFiles\3.14.4\VCTargetsPath.vcx
proj" (default targets) -- FAILED.
Build FAILED.
"C:\Users\user_name\AppData\Local\Temp\pip-install-xqz7oflh\dlib\build\temp
.win-amd64-3.7\Release\CMakeFiles\3.14.4\VCTargetsPath.vcxproj" (default target)
(1) ->
C:\Users\user_name\AppData\Local\Temp\pip-install-xqz7oflh\dlib\build\tem
p.win-amd64-3.7\Release\CMakeFiles\3.14.4\VCTargetsPath.vcxproj(14,2): error MSB
4019: The imported project "C:\Personal\Study Material\Python\dlib-19.6\build\CM
akeFiles\3.14.4\Microsoft.Cpp.Default.props" was not found. Confirm that the pat
h in the <Import> declaration is correct, and that the file exists on disk.
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:00.28
Exit code: 1
-- Configuring incomplete, errors occurred!
See also "C:/Users/user_name/AppData/Local/Temp/pip-install-xqz7oflh/dlib/build
/temp.win-amd64-3.7/Release/CMakeFiles/CMakeOutput.log".