-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dlib fails to install on Windows 10 #2371
Comments
Install Visual Studio Community (classic C++ option) fisrt for free and be blessed. |
Warning: this issue has been inactive for 35 days and will be automatically closed on 2021-07-07 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. |
I'm trying to install dlib from this link here, can anyone tell me which one do I need to install for python 3.9.1? |
Use the newest
… On Jun 30, 2021, at 5:07 AM, IsThisVisible ***@***.***> wrote:
I'm trying to install dlib from this link here, can anyone tell me which one do I need to install for python 3.9.1?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Tysm :D |
Warning: this issue has been inactive for 35 days and will be automatically closed on 2021-08-14 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 43 days and will be automatically closed on 2021-08-14 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. |
Please reopen this. This is an ongoing issue with lots of assumptions made, the first being that "The Universe uses Visual Studio." This is not true. I am running the following environment:
I do • Installing dlib (19.21.1)
EnvCommandError
[...]
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++.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[...] I'm a Python developer. I do not do C++ at all. I do not use Visual Studio at all. I'm trying to install I find it preposterous that the general rule is a blanket "Install VS 20##", ignoring the simple fact that we're being asked to install a sixteen gigabytes full IDE in order to compile what amounts to an 8MB I understand that different HW configurations require different compilations and that therefore Alternatively, is there any other compiler that doesn't use up the entire disk? Something non-IDE and non-Microsoft that could be used in such cases? I'm thinking of something along the lines of Linux Any suggestions would be highly appreciated. As it stands, I am forced to carry around a |
This isn't a dlib thing. It's a Python thing. If you want to compile any python extension on windows you have to use visual studio. See https://docs.python.org/3/extending/windows.html. |
Hi Davis, Thank you for the rather quick reply. That page was a nice refreshment on the differences between Linux and Windows, but I'm afraid it still does not serve the purpose of my enquiries. Fully aware that the fact that I'm currently locked to Windows (much to my personal distaste) is not The closest I found so far was How to install dlib library for Python in Windows 10 and this is by absolutely no means either comprehensive or accurate, or up-to-date (or even in English, claims my pedantic self). The approach seems to be install everything and put your hands together in prayer. Still not working in my device. Do you know of any such resource that would help people like me being able to successfully Here's the catch: if I succeed in coming up with something of the sort, I will submit it to be added to Many thanks |
Sorry, but it's not clear to me what the hang up is. Just installing visual studio (and clicking that you want c++ support when it asks in the installer) is sufficient. Assuming you have python and cmake installed as well. |
Again, thank you for replying on a Sunday, and join the club! It is not clear to me either what could it be that is hanging up, but as per my trace above, the system keeps claiming that I must install VS for C++, despite all the time I spent doing just that. Worse: it is working on my laptop, but not on any of the embedded devices. UPDATE: isn't it always something small and slightly humiliating? The issue was mismatched versions. CMake 3.18.4 supports as high as VS 16 (2019), same as I have on my laptop. However, on the devices I'm using VS 17 (2022). All it took was to get the latest CMake 3.22.1 and it immediately started working. You might think you didn't do much, but you helped. Thank you very much! |
bonjour tous le monde. svp j'ai cette erreur a chaque fois que j'essaye d'installer dlib sur anaconda3 environement |
我深表赞同! |
Expected Behavior
Expected dlib to be instalable on Windows 10 running Python 3.6 (as a conda virtual env) with command:
pip install dlib
. Have installed cmake and numpy as prerequisites. This failed with:(py36) PS C:\Users\Jean Claude> pip install dlib
Collecting dlib
Using cached dlib-19.22.0.tar.gz (7.4 MB)
Building wheels for collected packages: dlib
Building wheel for dlib (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\Jean Claude\anaconda3\envs\py36\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\JEANCL
1\AppData\Local\Temp\pip-install-bdv23ese\dlib_6034d75b85f2455eaa1e85e06b14242b\setup.py'"'"'; file='"'"'C:\Users\JEANCL1\AppData\Local\Temp\pip-install-bdv23ese\dlib_6034d75b85f2455eaa1e85e06b14242b\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\JEANCL1\AppData\Local\Temp\pip-wheel-03d14jpb'1\AppData\Local\Temp\pip-install-bdv23ese\dlib_6034d75b85f2455eaa1e85e06b14242bcwd: C:\Users\JEANCL
Complete output (58 lines):
running bdist_wheel
running build
running build_py
package init file 'tools\python\dlib_init_.py' not found (or not a regular file)
running build_ext
Building extension for Python 3.6.13 |Anaconda, Inc.| (default, Mar 16 2021, 11:37:27) [MSC v.1916 64 bit (AMD64)]
Invoking CMake setup: 'cmake C:\Users\JEANCL
1\AppData\Local\Temp\pip-install-bdv23ese\dlib_6034d75b85f2455eaa1e85e06b14242b\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\JEANCL1\AppData\Local\Temp\pip-install-bdv23ese\dlib_6034d75b85f2455eaa1e85e06b14242b\build\lib.win-amd64-3.6 -DPYTHON_EXECUTABLE=C:\Users\Jean Claude\anaconda3\envs\py36\python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\JEANCL~1\AppData\Local\Temp\pip-install-bdv23ese\dlib_6034d75b85f2455eaa1e85e06b14242b\build\lib.win-amd64-3.6 -A x64'-- Building for: NMake Makefiles
CMake Error at CMakeLists.txt:5 (message):
-- Configuring incomplete, errors occurred!
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\JEANCL
1\AppData\Local\Temp\pip-install-bdv23ese\dlib_6034d75b85f2455eaa1e85e06b14242b\setup.py", line 261, in1\AppData\Local\Temp\pip-install-bdv23ese\dlib_6034d75b85f2455eaa1e85e06b14242b\setup.py", line 134, in run'Topic :: Software Development',
File "C:\Users\Jean Claude\anaconda3\envs\py36\lib\site-packages\setuptools_init_.py", line 153, in setup
return distutils.core.setup(**attrs)
File "C:\Users\Jean Claude\anaconda3\envs\py36\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Users\Jean Claude\anaconda3\envs\py36\lib\distutils\dist.py", line 955, in run_commands
self.run_command(cmd)
File "C:\Users\Jean Claude\anaconda3\envs\py36\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Users\Jean Claude\anaconda3\envs\py36\lib\site-packages\wheel\bdist_wheel.py", line 299, in run
self.run_command('build')
File "C:\Users\Jean Claude\anaconda3\envs\py36\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Users\Jean Claude\anaconda3\envs\py36\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Users\Jean Claude\anaconda3\envs\py36\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "C:\Users\Jean Claude\anaconda3\envs\py36\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Users\Jean Claude\anaconda3\envs\py36\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Users\JEANCL
self.build_extension(ext)
File "C:\Users\JEANCL
1\AppData\Local\Temp\pip-install-bdv23ese\dlib_6034d75b85f2455eaa1e85e06b14242b\setup.py", line 171, in build_extension1\AppData\Local\Temp\pip-install-bdv23ese\dlib_6034d75b85f2455eaa1e85e06b14242b\tools\python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\JEANCLsubprocess.check_call(cmake_setup, cwd=build_folder)
File "C:\Users\Jean Claude\anaconda3\envs\py36\lib\subprocess.py", line 311, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'C:\Users\JEANCL
1\AppData\Local\Temp\pip-install-bdv23ese\dlib_6034d75b85f2455eaa1e85e06b14242b\build\lib.win-amd64-3.6', '-DPYTHON_EXECUTABLE=C:\Users\Jean Claude\anaconda3\envs\py36\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\JEANCL1\AppData\Local\Temp\pip-install-bdv23ese\dlib_6034d75b85f2455eaa1e85e06b14242b\build\lib.win-amd64-3.6', '-A', 'x64']' returned non-zero exit status 1.ERROR: Failed building wheel for dlib
Running setup.py clean for dlib
Failed to build dlib
Installing collected packages: dlib
Running setup.py install for dlib ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\Jean Claude\anaconda3\envs\py36\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\JEANCL
1\AppData\Local\Temp\pip-install-bdv23ese\dlib_6034d75b85f2455eaa1e85e06b14242b\setup.py'"'"'; file='"'"'C:\Users\JEANCL1\AppData\Local\Temp\pip-install-bdv23ese\dlib_6034d75b85f2455eaa1e85e06b14242b\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\JEANCL1\AppData\Local\Temp\pip-record-odoruwut\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\Jean Claude\anaconda3\envs\py36\Include\dlib'1\AppData\Local\Temp\pip-install-bdv23ese\dlib_6034d75b85f2455eaa1e85e06b14242bcwd: C:\Users\JEANCL
Complete output (60 lines):
running install
running build
running build_py
package init file 'tools\python\dlib_init_.py' not found (or not a regular file)
running build_ext
Building extension for Python 3.6.13 |Anaconda, Inc.| (default, Mar 16 2021, 11:37:27) [MSC v.1916 64 bit (AMD64)]
Invoking CMake setup: 'cmake C:\Users\JEANCL
1\AppData\Local\Temp\pip-install-bdv23ese\dlib_6034d75b85f2455eaa1e85e06b14242b\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\JEANCL1\AppData\Local\Temp\pip-install-bdv23ese\dlib_6034d75b85f2455eaa1e85e06b14242b\build\lib.win-amd64-3.6 -DPYTHON_EXECUTABLE=C:\Users\Jean Claude\anaconda3\envs\py36\python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\JEANCL~1\AppData\Local\Temp\pip-install-bdv23ese\dlib_6034d75b85f2455eaa1e85e06b14242b\build\lib.win-amd64-3.6 -A x64'-- Building for: NMake Makefiles
CMake Error at CMakeLists.txt:5 (message):
ERROR: Command errored out with exit status 1: 'C:\Users\Jean Claude\anaconda3\envs\py36\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\JEANCL
1\AppData\Local\Temp\pip-install-bdv23ese\dlib_6034d75b85f2455eaa1e85e06b14242b\setup.py'"'"'; file='"'"'C:\Users\JEANCL1\AppData\Local\Temp\pip-install-bdv23ese\dlib_6034d75b85f2455eaa1e85e06b14242b\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\JEANCL~1\AppData\Local\Temp\pip-record-odoruwut\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\Jean Claude\anaconda3\envs\py36\Include\dlib' Check the logs for full command output.The text was updated successfully, but these errors were encountered: