Closed ardamavi closed 5 years ago
You must use a C++11 compiler. Your compiler is super old. You need a newer compiler.
Collecting dlib
Using cached https://files.pythonhosted.org/packages/df/aa/6a9bb2a763107bb2606d6ee1aa65fcd3b51375a9ef6436e9c9280b0dd63c/dlib-19.15.0.tar.gz
Building wheels for collected packages: dlib
Running setup.py bdist_wheel for dlib ... error
Complete output from command /Users/ardamavi/anaconda/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/f9/h90n2gr17kx4gtnty5fqp5300000gn/T/pip-install-9xjsn8r6/dlib/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 /private/var/folders/f9/h90n2gr17kx4gtnty5fqp5300000gn/T/pip-wheel-3t8qwk37 --python-tag cp36:
running bdist_wheel
running build
running build_py
package init file 'dlib/__init__.py' not found (or not a regular file)
running build_ext
Building extension for Python 3.6.0 |Anaconda custom (64-bit)| (default, Dec 23 2016, 13:19:00)
Invoking CMake setup: 'cmake /private/var/folders/f9/h90n2gr17kx4gtnty5fqp5300000gn/T/pip-install-9xjsn8r6/dlib/tools/python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/private/var/folders/f9/h90n2gr17kx4gtnty5fqp5300000gn/T/pip-install-9xjsn8r6/dlib/build/lib.macosx-10.7-x86_64-3.6 -DPYTHON_EXECUTABLE=/Users/ardamavi/anaconda/bin/python -DCMAKE_BUILD_TYPE=Release'
-- The C compiler identification is AppleClang 9.1.0.9020039
-- The CXX compiler identification is AppleClang 9.1.0.9020039
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc -- broken
CMake Error at /usr/local/Cellar/cmake/3.12.1/share/cmake/Modules/CMakeTestCCompiler.cmake:52 (message):
The C compiler
"/Library/Developer/CommandLineTools/usr/bin/cc"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: /private/var/folders/f9/h90n2gr17kx4gtnty5fqp5300000gn/T/pip-install-9xjsn8r6/dlib/build/temp.macosx-10.7-x86_64-3.6/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_b3430/fast"
/Library/Developer/CommandLineTools/usr/bin/make -f CMakeFiles/cmTC_b3430.dir/build.make CMakeFiles/cmTC_b3430.dir/build
Building C object CMakeFiles/cmTC_b3430.dir/testCCompiler.c.o
/Library/Developer/CommandLineTools/usr/bin/cc -std=c++11 -o CMakeFiles/cmTC_b3430.dir/testCCompiler.c.o -c /private/var/folders/f9/h90n2gr17kx4gtnty5fqp5300000gn/T/pip-install-9xjsn8r6/dlib/build/temp.macosx-10.7-x86_64-3.6/CMakeFiles/CMakeTmp/testCCompiler.c
error: invalid argument '-std=c++11' not allowed with 'C'
make[1]: *** [CMakeFiles/cmTC_b3430.dir/testCCompiler.c.o] Error 1
make: *** [cmTC_b3430/fast] Error 2
CMake will not be able to correctly generate this project.
-- Configuring incomplete, errors occurred!
See also "/private/var/folders/f9/h90n2gr17kx4gtnty5fqp5300000gn/T/pip-install-9xjsn8r6/dlib/build/temp.macosx-10.7-x86_64-3.6/CMakeFiles/CMakeOutput.log".
See also "/private/var/folders/f9/h90n2gr17kx4gtnty5fqp5300000gn/T/pip-install-9xjsn8r6/dlib/build/temp.macosx-10.7-x86_64-3.6/CMakeFiles/CMakeError.log".
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/f9/h90n2gr17kx4gtnty5fqp5300000gn/T/pip-install-9xjsn8r6/dlib/setup.py", line 257, in <module>
'Topic :: Software Development',
File "/Users/ardamavi/anaconda/lib/python3.6/site-packages/setuptools/__init__.py", line 140, in setup
return distutils.core.setup(**attrs)
File "/Users/ardamavi/anaconda/lib/python3.6/distutils/core.py", line 148, in setup
dist.run_commands()
File "/Users/ardamavi/anaconda/lib/python3.6/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/Users/ardamavi/anaconda/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/Users/ardamavi/anaconda/lib/python3.6/site-packages/wheel/bdist_wheel.py", line 202, in run
self.run_command('build')
File "/Users/ardamavi/anaconda/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/Users/ardamavi/anaconda/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/Users/ardamavi/anaconda/lib/python3.6/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/Users/ardamavi/anaconda/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/Users/ardamavi/anaconda/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/private/var/folders/f9/h90n2gr17kx4gtnty5fqp5300000gn/T/pip-install-9xjsn8r6/dlib/setup.py", line 133, in run
self.build_extension(ext)
File "/private/var/folders/f9/h90n2gr17kx4gtnty5fqp5300000gn/T/pip-install-9xjsn8r6/dlib/setup.py", line 170, in build_extension
subprocess.check_call(cmake_setup, cwd=build_folder)
File "/Users/ardamavi/anaconda/lib/python3.6/subprocess.py", line 291, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '/private/var/folders/f9/h90n2gr17kx4gtnty5fqp5300000gn/T/pip-install-9xjsn8r6/dlib/tools/python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/private/var/folders/f9/h90n2gr17kx4gtnty5fqp5300000gn/T/pip-install-9xjsn8r6/dlib/build/lib.macosx-10.7-x86_64-3.6', '-DPYTHON_EXECUTABLE=/Users/ardamavi/anaconda/bin/python', '-DCMAKE_BUILD_TYPE=Release']' returned non-zero exit status 1.
----------------------------------------
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
Complete output from command /Users/ardamavi/anaconda/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/f9/h90n2gr17kx4gtnty5fqp5300000gn/T/pip-install-9xjsn8r6/dlib/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/f9/h90n2gr17kx4gtnty5fqp5300000gn/T/pip-record-tpo1qvqx/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
package init file 'dlib/__init__.py' not found (or not a regular file)
running build_ext
Building extension for Python 3.6.0 |Anaconda custom (64-bit)| (default, Dec 23 2016, 13:19:00)
Invoking CMake setup: 'cmake /private/var/folders/f9/h90n2gr17kx4gtnty5fqp5300000gn/T/pip-install-9xjsn8r6/dlib/tools/python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/private/var/folders/f9/h90n2gr17kx4gtnty5fqp5300000gn/T/pip-install-9xjsn8r6/dlib/build/lib.macosx-10.7-x86_64-3.6 -DPYTHON_EXECUTABLE=/Users/ardamavi/anaconda/bin/python -DCMAKE_BUILD_TYPE=Release'
-- The C compiler identification is AppleClang 9.1.0.9020039
-- The CXX compiler identification is AppleClang 9.1.0.9020039
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc -- broken
CMake Error at /usr/local/Cellar/cmake/3.12.1/share/cmake/Modules/CMakeTestCCompiler.cmake:52 (message):
The C compiler
"/Library/Developer/CommandLineTools/usr/bin/cc"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: /private/var/folders/f9/h90n2gr17kx4gtnty5fqp5300000gn/T/pip-install-9xjsn8r6/dlib/build/temp.macosx-10.7-x86_64-3.6/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_9bc8d/fast"
/Library/Developer/CommandLineTools/usr/bin/make -f CMakeFiles/cmTC_9bc8d.dir/build.make CMakeFiles/cmTC_9bc8d.dir/build
Building C object CMakeFiles/cmTC_9bc8d.dir/testCCompiler.c.o
/Library/Developer/CommandLineTools/usr/bin/cc -std=c++11 -o CMakeFiles/cmTC_9bc8d.dir/testCCompiler.c.o -c /private/var/folders/f9/h90n2gr17kx4gtnty5fqp5300000gn/T/pip-install-9xjsn8r6/dlib/build/temp.macosx-10.7-x86_64-3.6/CMakeFiles/CMakeTmp/testCCompiler.c
error: invalid argument '-std=c++11' not allowed with 'C'
make[1]: *** [CMakeFiles/cmTC_9bc8d.dir/testCCompiler.c.o] Error 1
make: *** [cmTC_9bc8d/fast] Error 2
CMake will not be able to correctly generate this project.
-- Configuring incomplete, errors occurred!
See also "/private/var/folders/f9/h90n2gr17kx4gtnty5fqp5300000gn/T/pip-install-9xjsn8r6/dlib/build/temp.macosx-10.7-x86_64-3.6/CMakeFiles/CMakeOutput.log".
See also "/private/var/folders/f9/h90n2gr17kx4gtnty5fqp5300000gn/T/pip-install-9xjsn8r6/dlib/build/temp.macosx-10.7-x86_64-3.6/CMakeFiles/CMakeError.log".
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/f9/h90n2gr17kx4gtnty5fqp5300000gn/T/pip-install-9xjsn8r6/dlib/setup.py", line 257, in <module>
'Topic :: Software Development',
File "/Users/ardamavi/anaconda/lib/python3.6/site-packages/setuptools/__init__.py", line 140, in setup
return distutils.core.setup(**attrs)
File "/Users/ardamavi/anaconda/lib/python3.6/distutils/core.py", line 148, in setup
dist.run_commands()
File "/Users/ardamavi/anaconda/lib/python3.6/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/Users/ardamavi/anaconda/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/Users/ardamavi/anaconda/lib/python3.6/site-packages/setuptools/command/install.py", line 61, in run
return orig.install.run(self)
File "/Users/ardamavi/anaconda/lib/python3.6/distutils/command/install.py", line 545, in run
self.run_command('build')
File "/Users/ardamavi/anaconda/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/Users/ardamavi/anaconda/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/Users/ardamavi/anaconda/lib/python3.6/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/Users/ardamavi/anaconda/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/Users/ardamavi/anaconda/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/private/var/folders/f9/h90n2gr17kx4gtnty5fqp5300000gn/T/pip-install-9xjsn8r6/dlib/setup.py", line 133, in run
self.build_extension(ext)
File "/private/var/folders/f9/h90n2gr17kx4gtnty5fqp5300000gn/T/pip-install-9xjsn8r6/dlib/setup.py", line 170, in build_extension
subprocess.check_call(cmake_setup, cwd=build_folder)
File "/Users/ardamavi/anaconda/lib/python3.6/subprocess.py", line 291, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '/private/var/folders/f9/h90n2gr17kx4gtnty5fqp5300000gn/T/pip-install-9xjsn8r6/dlib/tools/python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/private/var/folders/f9/h90n2gr17kx4gtnty5fqp5300000gn/T/pip-install-9xjsn8r6/dlib/build/lib.macosx-10.7-x86_64-3.6', '-DPYTHON_EXECUTABLE=/Users/ardamavi/anaconda/bin/python', '-DCMAKE_BUILD_TYPE=Release']' returned non-zero exit status 1.
----------------------------------------
Command "/Users/ardamavi/anaconda/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/f9/h90n2gr17kx4gtnty5fqp5300000gn/T/pip-install-9xjsn8r6/dlib/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/f9/h90n2gr17kx4gtnty5fqp5300000gn/T/pip-record-tpo1qvqx/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/f9/h90n2gr17kx4gtnty5fqp5300000gn/T/pip-install-9xjsn8r6/dlib/
I install with sudo conda install -c conda-forge dlib
command.
When I run
pip install dlib
, I get this output:I use MacBook Pro (2017), macOS High Sierra 10.13.6 Python 3.6.0 (With Anaconda) GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)
I try to re-install xcode and Command Line Tools, but problem not solved.