FACING ERROR OF INSTALLING DLIB WHEELS
PROBLEM000 opened this issue · 8 comments
What Operating System(s) are you seeing this problem on?
Windows
dlib version
dlib-19.24.2.tar.gz (11.8 MB)
Python version
3.10 64-BIT
Compiler
Using following applications: COMMAND PROMPT, WINDOWS POWERSHELL, VISUAL STUDIO 2019 (PYTHON CODING)
Expected Behavior
Hey there. It was supposed to install dlib perfectly, but an issue is being faced, and it cannot install the wheel for dlib. See below for more detail.
Current Behavior
Facing the following issue:
ERROR: Failed building wheel for dlib
Failed to build dlib
ERROR: Could not build wheels for dlib, which is required to install pyproject.toml-based projects
You may see the full code below.
Steps to Reproduce
The following is the full code for reference:
C:\Users\Koala>pip install dlib
Collecting dlib
Using cached dlib-19.24.2.tar.gz (11.8 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: dlib
Building wheel for dlib (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for dlib (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [73 lines of output]
running bdist_wheel
running build
running build_ext
:125: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
Building extension for Python 3.10.7 (tags/v3.10.7:6cc6b13, Sep 5 2022, 14:08:36) [MSC v.1933 64 bit (AMD64)]
Invoking CMake setup: 'cmake C:\Users\Koala\AppData\Local\Temp\pip-install-tzj2j_bj\dlib_dce8c974e2d944b9a995141d1b2468f2\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\Koala\AppData\Local\Temp\pip-install-tzj2j_bj\dlib_dce8c974e2d944b9a995141d1b2468f2\build\lib.win-amd64-cpython-310 -DPYTHON_EXECUTABLE=C:\Users\Koala\AppData\Local\Programs\Python\Python310\python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\Koala\AppData\Local\Temp\pip-install-tzj2j_bj\dlib_dce8c974e2d944b9a995141d1b2468f2\build\lib.win-amd64-cpython-310 -A x64'
-- Building for: NMake Makefiles
CMake Error at CMakeLists.txt:5 (message):
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
You must use Visual Studio to build a python extension on windows. If you
are getting this error it means you have not installed Visual C++. Note
that there are many flavors of Visual Studio, like Visual Studio for C#
development. You need to install Visual Studio for C++.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-- Configuring incomplete, errors occurred!
Traceback (most recent call last):
File "C:\Users\Koala\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
main()
File "C:\Users\Koala\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "C:\Users\Koala\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 251, in build_wheel
return _build_backend().build_wheel(wheel_directory, config_settings,
File "C:\Users\Koala\AppData\Local\Temp\pip-build-env-hcjusx27\overlay\Lib\site-packages\setuptools\build_meta.py", line 404, in build_wheel
return self._build_with_temp_dir(
File "C:\Users\Koala\AppData\Local\Temp\pip-build-env-hcjusx27\overlay\Lib\site-packages\setuptools\build_meta.py", line 389, in _build_with_temp_dir
self.run_setup()
File "C:\Users\Koala\AppData\Local\Temp\pip-build-env-hcjusx27\overlay\Lib\site-packages\setuptools\build_meta.py", line 311, in run_setup
exec(code, locals())
File "<string>", line 218, in <module>
File "C:\Users\Koala\AppData\Local\Temp\pip-build-env-hcjusx27\overlay\Lib\site-packages\setuptools\__init__.py", line 103, in setup
return distutils.core.setup(**attrs)
File "C:\Users\Koala\AppData\Local\Temp\pip-build-env-hcjusx27\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 185, in setup
return run_commands(dist)
File "C:\Users\Koala\AppData\Local\Temp\pip-build-env-hcjusx27\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 201, in run_commands
dist.run_commands()
File "C:\Users\Koala\AppData\Local\Temp\pip-build-env-hcjusx27\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 969, in run_commands
self.run_command(cmd)
File "C:\Users\Koala\AppData\Local\Temp\pip-build-env-hcjusx27\overlay\Lib\site-packages\setuptools\dist.py", line 963, in run_command
super().run_command(command)
File "C:\Users\Koala\AppData\Local\Temp\pip-build-env-hcjusx27\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
cmd_obj.run()
File "C:\Users\Koala\AppData\Local\Temp\pip-build-env-hcjusx27\overlay\Lib\site-packages\wheel\bdist_wheel.py", line 368, in run
self.run_command("build")
File "C:\Users\Koala\AppData\Local\Temp\pip-build-env-hcjusx27\overlay\Lib\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "C:\Users\Koala\AppData\Local\Temp\pip-build-env-hcjusx27\overlay\Lib\site-packages\setuptools\dist.py", line 963, in run_command
super().run_command(command)
File "C:\Users\Koala\AppData\Local\Temp\pip-build-env-hcjusx27\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
cmd_obj.run()
File "C:\Users\Koala\AppData\Local\Temp\pip-build-env-hcjusx27\overlay\Lib\site-packages\setuptools\_distutils\command\build.py", line 131, in run
self.run_command(cmd_name)
File "C:\Users\Koala\AppData\Local\Temp\pip-build-env-hcjusx27\overlay\Lib\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "C:\Users\Koala\AppData\Local\Temp\pip-build-env-hcjusx27\overlay\Lib\site-packages\setuptools\dist.py", line 963, in run_command
super().run_command(command)
File "C:\Users\Koala\AppData\Local\Temp\pip-build-env-hcjusx27\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
cmd_obj.run()
File "<string>", line 130, in run
File "<string>", line 167, in build_extension
File "C:\Users\Koala\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 369, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'C:\\Users\\Koala\\AppData\\Local\\Temp\\pip-install-tzj2j_bj\\dlib_dce8c974e2d944b9a995141d1b2468f2\\tools\\python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\\Users\\Koala\\AppData\\Local\\Temp\\pip-install-tzj2j_bj\\dlib_dce8c974e2d944b9a995141d1b2468f2\\build\\lib.win-amd64-cpython-310', '-DPYTHON_EXECUTABLE=C:\\Users\\Koala\\AppData\\Local\\Programs\\Python\\Python310\\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\Users\\Koala\\AppData\\Local\\Temp\\pip-install-tzj2j_bj\\dlib_dce8c974e2d944b9a995141d1b2468f2\\build\\lib.win-amd64-cpython-310', '-A', 'x64']' returned non-zero exit status 1.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for dlib
Failed to build dlib
ERROR: Could not build wheels for dlib, which is required to install pyproject.toml-based projects
Anything else?
Please let me know how to fix the issue as my IT Exhibition is due in a little while!! Thnx a lot.
You must use Visual Studio to build a python extension on windows. If you are getting this error it means you have not installed Visual C++. Note that there are many flavors of Visual Studio, like Visual Studio for C# development. You need to install Visual Studio for C++.
…
On Dec 28, 2023, at 8:55 AM, PROBLEM000 @.***> wrote: You must use Visual Studio to build a python extension on windows. If you are getting this error it means you have not installed Visual C++. Note that there are many flavors of Visual Studio, like Visual Studio for C# development. You need to install Visual Studio for C++.
Hi Brother! Actually, I have installed Visual Studio 2019. Is the C++ Version some other application specifically designed for C++ codes? I'm actually going to import this in Visual Studio using Python Programming to make a face-recognition age predictor program. Thanks a ton brother.
When installing visual studio you have to click the check box to say to install visual C++ too or it won't do it and you will get only part of visual studio (the part that doesn't include a C++ compiler).
When installing visual studio you have to click the check box to say to install visual C++ too or it won't do it and you will get only part of visual studio (the part that doesn't include a C++ compiler).
Hey there! Alright, now I don't know where to do this from. Could you guide me a little? I'm not sure if I installed it already or not. Do you know a way to check if I installed or not? Thanks!
When installing visual studio you have to click the check box to say to install visual C++ too or it won't do it and you will get only part of visual studio (the part that doesn't include a C++ compiler).
Hey there! Alright, now I don't know where to do this from. Could you guide me a little? I'm not sure if I installed it already or not. Do you know a way to check if I installed or not? Thanks!
Alright I figured it out. Thanks a lot @davisking! You're a life-saver! I'll update you on the success of the IT Exhibition, so I'll close it in a few days after updating.
Warning: this issue has been inactive for 35 days and will be automatically closed on 2024-02-20 if there is no further activity.
If you are waiting for a response but haven't received one it's possible your question is somehow inappropriate. E.g. it is off topic, you didn't follow the issue submission instructions, or your question is easily answerable by reading the FAQ, dlib's official compilation instructions, dlib's API documentation, or a Google search.
Warning: this issue has been inactive for 42 days and will be automatically closed on 2024-02-20 if there is no further activity.
If you are waiting for a response but haven't received one it's possible your question is somehow inappropriate. E.g. it is off topic, you didn't follow the issue submission instructions, or your question is easily answerable by reading the FAQ, dlib's official compilation instructions, dlib's API documentation, or a Google search.
Notice: this issue has been closed because it has been inactive for 45 days. You may reopen this issue if it has been closed in error.