I'm currently doing a project to learn how to use deepfake in videos, but encountered some problems setting up. I ran this command: pip3 install pynvx and also tried pip install pynvx, but none seems to work.
It spits out this error, hopefully someone could bless me with your skill:
My-MacBook-Pro:faceswap yuxin$ pip3 install pynvx
Collecting pynvx
Using cached
https://files.pythonhosted.org/packages/02/c6/90f26fee13f4b264946f74ece86b815cb01cc07035c2c5c80ab82f690a4f/pynvx-0.0.4.tar.gz
Building wheels for collected packages: pynvx
Running setup.py bdist_wheel for pynvx ... error
Complete output from command /Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7 -u -c "import setuptools, tokenize;__file__='/private/var/folders/30/xz4gwwrs655bvkh28n60p3b00000gp/T/pip-install-zquaz24q/pynvx/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/30/xz4gwwrs655bvkh28n60p3b00000gp/T/pip-wheel-ij1brnnf --python-tag cp37:
Warning: 'keywords' should be a list, got type 'tuple'
running bdist_wheel
running build
running build_ext
-- The C compiler identification is AppleClang 10.0.0.10001044
-- The CXX compiler identification is AppleClang 10.0.0.10001044
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PythonInterp: /Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7 (found version "3.7.1")
-- Found PythonLibs: /Library/Frameworks/Python.framework/Versions/3.7/lib/libpython3.7m.dylib
-- Performing Test HAS_CPP14_FLAG
-- Performing Test HAS_CPP14_FLAG - Success
-- pybind11 v2.3.dev0
-- Performing Test HAS_FLTO
-- Performing Test HAS_FLTO - Success
-- LTO enabled
CMake Error at /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/cmake/data/CMake.app/Contents/share/cmake-3.13/Modules/FindCUDA.cmake:696 (message):
Specify CUDA_TOOLKIT_ROOT_DIR
Call Stack (most recent call first):
CMakeLists.txt:8 (find_package)
-- Configuring incomplete, errors occurred!
See also "/private/var/folders/30/xz4gwwrs655bvkh28n60p3b00000gp/T/pip-install-zquaz24q/pynvx/build/temp.macosx-10.9-x86_64-3.7/CMakeFiles/CMakeOutput.log".
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/30/xz4gwwrs655bvkh28n60p3b00000gp/T/pip-install-zquaz24q/pynvx/setup.py", line 107, in <module>
"Topic :: Software Development :: Libraries :: Python Modules",
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/setuptools/__init__.py", line 129, in setup
return distutils.core.setup(**attrs)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/core.py", line 148, in setup
dist.run_commands()
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/wheel/bdist_wheel.py", line 188, in run
self.run_command('build')
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/private/var/folders/30/xz4gwwrs655bvkh28n60p3b00000gp/T/pip-install-zquaz24q/pynvx/setup.py", line 32, in run
self.build_extension(ext)
File "/private/var/folders/30/xz4gwwrs655bvkh28n60p3b00000gp/T/pip-install-zquaz24q/pynvx/setup.py", line 56, in build_extension
subprocess.check_call(['cmake', ext.sourcedir] + cmake_args, cwd=self.build_temp, env=env)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 341, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '/private/var/folders/30/xz4gwwrs655bvkh28n60p3b00000gp/T/pip-install-zquaz24q/pynvx', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/private/var/folders/30/xz4gwwrs655bvkh28n60p3b00000gp/T/pip-install-zquaz24q/pynvx/build/lib.macosx-10.9-x86_64-3.7', '-DPYTHON_EXECUTABLE=/Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7', '-DCMAKE_BUILD_TYPE=Release']' returned non-zero exit status 1.
----------------------------------------
Failed building wheel for pynvx
Running setup.py clean for pynvx
Failed to build pynvx
Installing collected packages: pynvx
Running setup.py install for pynvx ... error
Complete output from command /Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7 -u -c "import setuptools, tokenize;__file__='/private/var/folders/30/xz4gwwrs655bvkh28n60p3b00000gp/T/pip-install-zquaz24q/pynvx/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/30/xz4gwwrs655bvkh28n60p3b00000gp/T/pip-record-ufc9w816/install-record.txt --single-version-externally-managed --compile:
Warning: 'keywords' should be a list, got type 'tuple'
running install
running build
running build_ext
-- The C compiler identification is AppleClang 10.0.0.10001044
-- The CXX compiler identification is AppleClang 10.0.0.10001044
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PythonInterp: /Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7 (found version "3.7.1")
-- Found PythonLibs: /Library/Frameworks/Python.framework/Versions/3.7/lib/libpython3.7m.dylib
-- Performing Test HAS_CPP14_FLAG
-- Performing Test HAS_CPP14_FLAG - Success
-- pybind11 v2.3.dev0
-- Performing Test HAS_FLTO
-- Performing Test HAS_FLTO - Success
-- LTO enabled
CMake Error at /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/cmake/data/CMake.app/Contents/share/cmake-3.13/Modules/FindCUDA.cmake:696 (message):
Specify CUDA_TOOLKIT_ROOT_DIR
Call Stack (most recent call first):
CMakeLists.txt:8 (find_package)
-- Configuring incomplete, errors occurred!
See also "/private/var/folders/30/xz4gwwrs655bvkh28n60p3b00000gp/T/pip-install-zquaz24q/pynvx/build/temp.macosx-10.9-x86_64-3.7/CMakeFiles/CMakeOutput.log".
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/30/xz4gwwrs655bvkh28n60p3b00000gp/T/pip-install-zquaz24q/pynvx/setup.py", line 107, in <module>
"Topic :: Software Development :: Libraries :: Python Modules",
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/setuptools/__init__.py", line 129, in setup
return distutils.core.setup(**attrs)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/core.py", line 148, in setup
dist.run_commands()
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/setuptools/command/install.py", line 61, in run
return orig.install.run(self)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/command/install.py", line 545, in run
self.run_command('build')
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/private/var/folders/30/xz4gwwrs655bvkh28n60p3b00000gp/T/pip-install-zquaz24q/pynvx/setup.py", line 32, in run
self.build_extension(ext)
File "/private/var/folders/30/xz4gwwrs655bvkh28n60p3b00000gp/T/pip-install-zquaz24q/pynvx/setup.py", line 56, in build_extension
subprocess.check_call(['cmake', ext.sourcedir] + cmake_args, cwd=self.build_temp, env=env)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 341, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '/private/var/folders/30/xz4gwwrs655bvkh28n60p3b00000gp/T/pip-install-zquaz24q/pynvx', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/private/var/folders/30/xz4gwwrs655bvkh28n60p3b00000gp/T/pip-install-zquaz24q/pynvx/build/lib.macosx-10.9-x86_64-3.7', '-DPYTHON_EXECUTABLE=/Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7', '-DCMAKE_BUILD_TYPE=Release']' returned non-zero exit status 1.
----------------------------------------
Command "/Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7 -u -c "import setuptools, tokenize;__file__='/private/var/folders/30/xz4gwwrs655bvkh28n60p3b00000gp/T/pip-install-zquaz24q/pynvx/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/30/xz4gwwrs655bvkh28n60p3b00000gp/T/pip-record-ufc9w816/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/30/xz4gwwrs655bvkh28n60p3b00000gp/T/pip-install-zquaz24q/pynvx/
I have no idea what's going on, googled around but can't seem to find anything that helps, so I would really appreciate any help given. Thanks
Oh, solved it, I google pynvx and a PyPi page popped up, went to Downloads Page and downloaded their pynvx-0.0.4.tar.gz file, and installed it using $pip install pynvx-0.0.4.tar.gz
Thank you to #a_guest for your help top!
Related
I'm having trouble installing dlib on a centos7 server that doesn't have a GPU.
I've looked through the internet but was unable to find a valid solution.
One of the answers which I came across was that The problem was that Python needs to be compiled with the --enable-shared flag for the dlib install to succeed.
But apparently this should be avoided because it can cause additional problems.
This is the error I get.
ERROR: Command errored out with exit status 1:
command: /home/biotest/test2/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-o9l2b5q2/dlib_40beddc2aee742ccaa15ab4582c22263/setup.py'"'"'; __file__='"'"'/tmp/pip-install-o9l2b5q2/dlib_40beddc2aee742ccaa15ab4582c22263/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-nmjzjw_2
cwd: /tmp/pip-install-o9l2b5q2/dlib_40beddc2aee742ccaa15ab4582c22263/
Complete output (76 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.8 (default, Nov 16 2020, 16:55:22)
Invoking CMake setup: 'cmake /tmp/pip-install-o9l2b5q2/dlib_40beddc2aee742ccaa15ab4582c22263/tools/python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/tmp/pip-install-o9l2b5q2/dlib_40beddc2aee742ccaa15ab4582c22263/build/lib.linux-x86_64-3.6 -DPYTHON_EXECUTABLE=/home/biotest/test2/bin/python3 -DCMAKE_BUILD_TYPE=Release'
-- The C compiler identification is GNU 4.8.5
-- The CXX compiler identification is GNU 4.8.5
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PythonInterp: /home/biotest/test2/bin/python3 (found version "3.6.8")
-- Found PythonLibs: python3.6m
-- Performing Test HAS_CPP14_FLAG
-- Performing Test HAS_CPP14_FLAG - Failed
-- Performing Test HAS_CPP11_FLAG
-- Performing Test HAS_CPP11_FLAG - Success
-- pybind11 v2.2.4
-- Using CMake version: 3.21.1
-- Compiling dlib version: 19.22.1
CMake Error at /tmp/pip-install-o9l2b5q2/dlib_40beddc2aee742ccaa15ab4582c22263/dlib/cmake_utils/set_compiler_specific_options.cmake:50 (message):
C++11 is required to use dlib, but the version of GCC you are using is too
old and doesn't support C++11. You need GCC 4.9 or newer.
Call Stack (most recent call first):
/tmp/pip-install-o9l2b5q2/dlib_40beddc2aee742ccaa15ab4582c22263/dlib/cmake_utils/test_for_sse4/CMakeLists.txt:8 (include)
CMake Error at /tmp/pip-install-o9l2b5q2/dlib_40beddc2aee742ccaa15ab4582c22263/dlib/cmake_utils/check_if_sse4_instructions_executable_on_host.cmake:13 (try_compile):
Failed to configure test project build system.
Call Stack (most recent call first):
/tmp/pip-install-o9l2b5q2/dlib_40beddc2aee742ccaa15ab4582c22263/dlib/cmake_utils/set_compiler_specific_options.cmake:13 (include)
/tmp/pip-install-o9l2b5q2/dlib_40beddc2aee742ccaa15ab4582c22263/dlib/CMakeLists.txt:33 (include)
-- Configuring incomplete, errors occurred!
See also "/tmp/pip-install-o9l2b5q2/dlib_40beddc2aee742ccaa15ab4582c22263/build/temp.linux-x86_64-3.6/CMakeFiles/CMakeOutput.log".
See also "/tmp/pip-install-o9l2b5q2/dlib_40beddc2aee742ccaa15ab4582c22263/build/temp.linux-x86_64-3.6/CMakeFiles/CMakeError.log".
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-o9l2b5q2/dlib_40beddc2aee742ccaa15ab4582c22263/setup.py", line 261, in <module>
'Topic :: Software Development',
File "/home/biotest/test2/lib64/python3.6/site-packages/setuptools/__init__.py", line 129, in setup
return distutils.core.setup(**attrs)
File "/usr/lib64/python3.6/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib64/python3.6/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/usr/lib64/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/home/biotest/test2/lib64/python3.6/site-packages/wheel/bdist_wheel.py", line 299, in run
self.run_command('build')
File "/usr/lib64/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib64/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/lib64/python3.6/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/usr/lib64/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib64/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/tmp/pip-install-o9l2b5q2/dlib_40beddc2aee742ccaa15ab4582c22263/setup.py", line 134, in run
self.build_extension(ext)
File "/tmp/pip-install-o9l2b5q2/dlib_40beddc2aee742ccaa15ab4582c22263/setup.py", line 171, in build_extension
subprocess.check_call(cmake_setup, cwd=build_folder)
File "/usr/lib64/python3.6/subprocess.py", line 311, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '/tmp/pip-install-o9l2b5q2/dlib_40beddc2aee742ccaa15ab4582c22263/tools/python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/tmp/pip-install-o9l2b5q2/dlib_40beddc2aee742ccaa15ab4582c22263/build/lib.linux-x86_64-3.6', '-DPYTHON_EXECUTABLE=/home/biotest/test2/bin/python3', '-DCMAKE_BUILD_TYPE=Release']' 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: /home/biotest/test2/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-o9l2b5q2/dlib_40beddc2aee742ccaa15ab4582c22263/setup.py'"'"'; __file__='"'"'/tmp/pip-install-o9l2b5q2/dlib_40beddc2aee742ccaa15ab4582c22263/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-sfiq9dha/install-record.txt --single-version-externally-managed --compile --install-headers /home/biotest/test2/include/site/python3.6/dlib
cwd: /tmp/pip-install-o9l2b5q2/dlib_40beddc2aee742ccaa15ab4582c22263/
Complete output (78 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.8 (default, Nov 16 2020, 16:55:22)
Invoking CMake setup: 'cmake /tmp/pip-install-o9l2b5q2/dlib_40beddc2aee742ccaa15ab4582c22263/tools/python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/tmp/pip-install-o9l2b5q2/dlib_40beddc2aee742ccaa15ab4582c22263/build/lib.linux-x86_64-3.6 -DPYTHON_EXECUTABLE=/home/biotest/test2/bin/python3 -DCMAKE_BUILD_TYPE=Release'
-- The C compiler identification is GNU 4.8.5
-- The CXX compiler identification is GNU 4.8.5
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PythonInterp: /home/biotest/test2/bin/python3 (found version "3.6.8")
-- Found PythonLibs: python3.6m
-- Performing Test HAS_CPP14_FLAG
-- Performing Test HAS_CPP14_FLAG - Failed
-- Performing Test HAS_CPP11_FLAG
-- Performing Test HAS_CPP11_FLAG - Success
-- pybind11 v2.2.4
-- Using CMake version: 3.21.1
-- Compiling dlib version: 19.22.1
CMake Error at /tmp/pip-install-o9l2b5q2/dlib_40beddc2aee742ccaa15ab4582c22263/dlib/cmake_utils/set_compiler_specific_options.cmake:50 (message):
C++11 is required to use dlib, but the version of GCC you are using is too
old and doesn't support C++11. You need GCC 4.9 or newer.
Call Stack (most recent call first):
/tmp/pip-install-o9l2b5q2/dlib_40beddc2aee742ccaa15ab4582c22263/dlib/cmake_utils/test_for_sse4/CMakeLists.txt:8 (include)
CMake Error at /tmp/pip-install-o9l2b5q2/dlib_40beddc2aee742ccaa15ab4582c22263/dlib/cmake_utils/check_if_sse4_instructions_executable_on_host.cmake:13 (try_compile):
Failed to configure test project build system.
Call Stack (most recent call first):
/tmp/pip-install-o9l2b5q2/dlib_40beddc2aee742ccaa15ab4582c22263/dlib/cmake_utils/set_compiler_specific_options.cmake:13 (include)
/tmp/pip-install-o9l2b5q2/dlib_40beddc2aee742ccaa15ab4582c22263/dlib/CMakeLists.txt:33 (include)
-- Configuring incomplete, errors occurred!
See also "/tmp/pip-install-o9l2b5q2/dlib_40beddc2aee742ccaa15ab4582c22263/build/temp.linux-x86_64-3.6/CMakeFiles/CMakeOutput.log".
See also "/tmp/pip-install-o9l2b5q2/dlib_40beddc2aee742ccaa15ab4582c22263/build/temp.linux-x86_64-3.6/CMakeFiles/CMakeError.log".
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-o9l2b5q2/dlib_40beddc2aee742ccaa15ab4582c22263/setup.py", line 261, in <module>
'Topic :: Software Development',
File "/home/biotest/test2/lib64/python3.6/site-packages/setuptools/__init__.py", line 129, in setup
return distutils.core.setup(**attrs)
File "/usr/lib64/python3.6/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib64/python3.6/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/usr/lib64/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/home/biotest/test2/lib64/python3.6/site-packages/setuptools/command/install.py", line 61, in run
return orig.install.run(self)
File "/usr/lib64/python3.6/distutils/command/install.py", line 556, in run
self.run_command('build')
File "/usr/lib64/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib64/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/lib64/python3.6/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/usr/lib64/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib64/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/tmp/pip-install-o9l2b5q2/dlib_40beddc2aee742ccaa15ab4582c22263/setup.py", line 134, in run
self.build_extension(ext)
File "/tmp/pip-install-o9l2b5q2/dlib_40beddc2aee742ccaa15ab4582c22263/setup.py", line 171, in build_extension
subprocess.check_call(cmake_setup, cwd=build_folder)
File "/usr/lib64/python3.6/subprocess.py", line 311, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '/tmp/pip-install-o9l2b5q2/dlib_40beddc2aee742ccaa15ab4582c22263/tools/python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/tmp/pip-install-o9l2b5q2/dlib_40beddc2aee742ccaa15ab4582c22263/build/lib.linux-x86_64-3.6', '-DPYTHON_EXECUTABLE=/home/biotest/test2/bin/python3', '-DCMAKE_BUILD_TYPE=Release']' returned non-zero exit status 1.
----------------------------------------
ERROR: Command errored out with exit status 1: /home/biotest/test2/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-o9l2b5q2/dlib_40beddc2aee742ccaa15ab4582c22263/setup.py'"'"'; __file__='"'"'/tmp/pip-install-o9l2b5q2/dlib_40beddc2aee742ccaa15ab4582c22263/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-sfiq9dha/install-record.txt --single-version-externally-managed --compile --install-headers /home/biotest/test2/include/site/python3.6/dlib Check the logs for full command output.
(test2) [root#localhost biotest]#
maybe you can use conda install dlib
conda install dlib
conda install -c conda-forge dlib
I cant install dlib on python with cmd , I have downloaded cmake and putted it on PATH, or is there any plugin i have to download it first ? Or does my pip's environment is located at a wrong place ? Or do I have to change my python to 64 bit instead of 32 bit ? If I have to do so , please let me know the way to do it , I am a newbie
C:\Users\Yusuf>python -m pip install dlib --user
Collecting dlib
Using cached https://files.pythonhosted.org/packages/63/92/05c3b98636661cb80d190a5a777dd94effcc14c0f6893222e5ca81e74fbc/dlib-19.19.0.tar.gz
Installing collected packages: dlib
Running setup.py install for dlib ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Program Files (x86)\Python38-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Yusuf\\AppData\\Local\\Temp\\pip-install-lpo7_ajq\\dlib\\setup.py'"'"'; __file__='"'"'C:\\Users\\Yusuf\\AppData\\Local\\Temp\\pip-install-lpo7_ajq\\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 'C:\Users\Yusuf\AppData\Local\Temp\pip-record-0h0t6gan\install-record.txt' --single-version-externally-managed --compile --user --prefix=
cwd: C:\Users\Yusuf\AppData\Local\Temp\pip-install-lpo7_ajq\dlib\
Complete output (65 lines):
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.8.0 (tags/v3.8.0:fa919fd, Oct 14 2019, 19:21:23) [MSC v.1916 32 bit (Intel)]
Invoking CMake setup: 'cmake C:\Users\Yusuf\AppData\Local\Temp\pip-install-lpo7_ajq\dlib\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\Yusuf\AppData\Local\Temp\pip-install-lpo7_ajq\dlib\build\lib.win32-3.8 -DPYTHON_EXECUTABLE=C:\Program Files (x86)\Python38-32\python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\Yusuf\AppData\Local\Temp\pip-install-lpo7_ajq\dlib\build\lib.win32-3.8'
-- Building for: Visual Studio 16 2019
-- The C compiler identification is MSVC 19.24.28314.0
-- The CXX compiler identification is MSVC 19.24.28314.0
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.24.28314/bin/Hostx64/x64/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.24.28314/bin/Hostx64/x64/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.24.28314/bin/Hostx64/x64/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.24.28314/bin/Hostx64/x64/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PythonInterp: C:/Program Files (x86)/Python38-32/python.exe (found version "3.8")
CMake Error at C:/Users/Yusuf/AppData/Local/Temp/pip-install-lpo7_ajq/dlib/dlib/external/pybind11/tools/FindPythonLibsNew.cmake:124 (message):
Python config failure: Python is 32-bit, chosen compiler is 64-bit
Call Stack (most recent call first):
C:/Users/Yusuf/AppData/Local/Temp/pip-install-lpo7_ajq/dlib/dlib/external/pybind11/tools/pybind11Tools.cmake:16 (find_package)
C:/Users/Yusuf/AppData/Local/Temp/pip-install-lpo7_ajq/dlib/dlib/external/pybind11/CMakeLists.txt:33 (include)
-- Configuring incomplete, errors occurred!
See also "C:/Users/Yusuf/AppData/Local/Temp/pip-install-lpo7_ajq/dlib/build/temp.win32-3.8/Release/CMakeFiles/CMakeOutput.log".
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Yusuf\AppData\Local\Temp\pip-install-lpo7_ajq\dlib\setup.py", line 223, in <module>
setup(
File "C:\Program Files (x86)\Python38-32\lib\site-packages\setuptools\__init__.py", line 145, in setup
return distutils.core.setup(**attrs)
File "C:\Program Files (x86)\Python38-32\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Program Files (x86)\Python38-32\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "C:\Program Files (x86)\Python38-32\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Program Files (x86)\Python38-32\lib\site-packages\setuptools\command\install.py", line 61, in run
return orig.install.run(self)
File "C:\Program Files (x86)\Python38-32\lib\distutils\command\install.py", line 545, in run
self.run_command('build')
File "C:\Program Files (x86)\Python38-32\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Program Files (x86)\Python38-32\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Program Files (x86)\Python38-32\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "C:\Program Files (x86)\Python38-32\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Program Files (x86)\Python38-32\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\Yusuf\AppData\Local\Temp\pip-install-lpo7_ajq\dlib\setup.py", line 135, in run
self.build_extension(ext)
File "C:\Users\Yusuf\AppData\Local\Temp\pip-install-lpo7_ajq\dlib\setup.py", line 172, in build_extension
subprocess.check_call(cmake_setup, cwd=build_folder)
File "C:\Program Files (x86)\Python38-32\lib\subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'C:\\Users\\Yusuf\\AppData\\Local\\Temp\\pip-install-lpo7_ajq\\dlib\\tools\\python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\\Users\\Yusuf\\AppData\\Local\\Temp\\pip-install-lpo7_ajq\\dlib\\build\\lib.win32-3.8', '-DPYTHON_EXECUTABLE=C:\\Program Files (x86)\\Python38-32\\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\Users\\Yusuf\\AppData\\Local\\Temp\\pip-install-lpo7_ajq\\dlib\\build\\lib.win32-3.8']' returned non-zero exit status 1.
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Program Files (x86)\Python38-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Yusuf\\AppData\\Local\\Temp\\pip-install-lpo7_ajq\\dlib\\setup.py'"'"'; __file__='"'"'C:\\Users\\Yusuf\\AppData\\Local\\Temp\\pip-install-lpo7_ajq\\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 'C:\Users\Yusuf\AppData\Local\Temp\pip-record-0h0t6gan\install-record.txt' --single-version-externally-managed --compile --user --prefix= Check the logs for full command output.
Please help me thank you !
NOTE:First make sure you have installed c++ compilers and cmake Then start following the sptes:
go to dlib on github
click on clone or download button and then download the package manually by clicking on the zip download And after the download finished , extract the file and put it in desktop
3.Then open Powershell or cmd
4.type in the command cd C:/users/(your username)/Desktop/master-dlib/master-dlib
5.Then when you changed your current working directory then type in the command python setup.py install
NOTE2: This is the manual way but also look into This Too.
go to python.org copy link location of latest binary executable or binary specific to your python version .
in cmd prompt typepython -m pip install +paste link location.
now run your .py file having dlib .
I'm trying to install Dlib on my Windows 8.1 with this command:
python -m pip install dlib
After I run it I get this error log:
ERROR: Command errored out with exit status 1:
command: 'C:\Program Files (x86)\Python37-32\python.exe' -u -c 'import sys,
setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\YOSIFA~1\\AppData\\Local\\T
emp\\pip-install-j8dowk8r\\dlib\\setup.py'"'"'; __file__='"'"'C:\\Users\\YOSIFA~
1\\AppData\\Local\\Temp\\pip-install-j8dowk8r\\dlib\\setup.py'"'"';f=getattr(tok
enize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'
"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --re
cord 'C:\Users\YOSIFA~1\AppData\Local\Temp\pip-record-6s43j4hs\install-record.tx
t' --single-version-externally-managed --compile
cwd: C:\Users\YOSIFA~1\AppData\Local\Temp\pip-install-j8dowk8r\dlib\
Complete output (66 lines):
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.7.4 (tags/v3.7.4:e09359112e, Jul 8 2019, 19
:29:22) [MSC v.1916 32 bit (Intel)]
Invoking CMake setup: 'cmake C:\Users\YOSIFA~1\AppData\Local\Temp\pip-instal
l-j8dowk8r\dlib\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\YOSIFA~1\
AppData\Local\Temp\pip-install-j8dowk8r\dlib\build\lib.win32-3.7 -DPYTHON_EXECUT
ABLE=C:\Program Files (x86)\Python37-32\python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECT
ORY_RELEASE=C:\Users\YOSIFA~1\AppData\Local\Temp\pip-install-j8dowk8r\dlib\build
\lib.win32-3.7'
-- Building for: Visual Studio 16 2019
-- Selecting Windows SDK version 8.1 to target Windows 6.3.9600.
-- The C compiler identification is MSVC 19.22.27905.0
-- The CXX compiler identification is MSVC 19.22.27905.0
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Stu
dio/2019/Community/VC/Tools/MSVC/14.22.27905/bin/Hostx64/x64/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Stu
dio/2019/Community/VC/Tools/MSVC/14.22.27905/bin/Hostx64/x64/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual S
tudio/2019/Community/VC/Tools/MSVC/14.22.27905/bin/Hostx64/x64/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual S
tudio/2019/Community/VC/Tools/MSVC/14.22.27905/bin/Hostx64/x64/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PythonInterp: C:/Program Files (x86)/Python37-32/python.exe (found
version "3.7.4")
CMake Error at C:/Users/wwwwwwwww/AppData/Local/Temp/pip-install-j8dowk8
r/dlib/dlib/external/pybind11/tools/FindPythonLibsNew.cmake:122 (message):
Python config failure: Python is 32-bit, chosen compiler is 64-bit
Call Stack (most recent call first):
C:/Users/wwwwwwwww/AppData/Local/Temp/pip-install-j8dowk8r/dlib/dlib/e
xternal/pybind11/tools/pybind11Tools.cmake:16 (find_package)
C:/Users/wwwwwwwww/AppData/Local/Temp/pip-install-j8dowk8r/dlib/dlib/e
xternal/pybind11/CMakeLists.txt:33 (include)
-- Configuring incomplete, errors occurred!
See also "C:/Users/wwwwwwwww/AppData/Local/Temp/pip-install-j8dowk8r/dli
b/build/temp.win32-3.7/Release/CMakeFiles/CMakeOutput.log".
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\YOSIFA~1\AppData\Local\Temp\pip-install-j8dowk8r\dlib\setup
.py", line 261, in <module>
'Topic :: Software Development',
File "C:\Program Files (x86)\Python37-32\lib\site-packages\setuptools\__in
it__.py", line 145, in setup
return distutils.core.setup(**attrs)
File "C:\Program Files (x86)\Python37-32\lib\distutils\core.py", line 148,
in setup
dist.run_commands()
File "C:\Program Files (x86)\Python37-32\lib\distutils\dist.py", line 966,
in run_commands
self.run_command(cmd)
File "C:\Program Files (x86)\Python37-32\lib\distutils\dist.py", line 985,
in run_command
cmd_obj.run()
File "C:\Program Files (x86)\Python37-32\lib\site-packages\setuptools\comm
and\install.py", line 61, in run
return orig.install.run(self)
File "C:\Program Files (x86)\Python37-32\lib\distutils\command\install.py"
, line 545, in run
self.run_command('build')
File "C:\Program Files (x86)\Python37-32\lib\distutils\cmd.py", line 313,
in run_command
self.distribution.run_command(command)
File "C:\Program Files (x86)\Python37-32\lib\distutils\dist.py", line 985,
in run_command
cmd_obj.run()
File "C:\Program Files (x86)\Python37-32\lib\distutils\command\build.py",
line 135, in run
self.run_command(cmd_name)
File "C:\Program Files (x86)\Python37-32\lib\distutils\cmd.py", line 313,
in run_command
self.distribution.run_command(command)
File "C:\Program Files (x86)\Python37-32\lib\distutils\dist.py", line 985,
in run_command
cmd_obj.run()
File "C:\Users\YOSIFA~1\AppData\Local\Temp\pip-install-j8dowk8r\dlib\setup
.py", line 135, in run
self.build_extension(ext)
File "C:\Users\YOSIFA~1\AppData\Local\Temp\pip-install-j8dowk8r\dlib\setup
.py", line 172, in build_extension
subprocess.check_call(cmake_setup, cwd=build_folder)
File "C:\Program Files (x86)\Python37-32\lib\subprocess.py", line 347, in
check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'C:\\Users\\YOSIFA~1\\AppD
ata\\Local\\Temp\\pip-install-j8dowk8r\\dlib\\tools\\python', '-DCMAKE_LIBRARY_O
UTPUT_DIRECTORY=C:\\Users\\YOSIFA~1\\AppData\\Local\\Temp\\pip-install-j8dowk8r\
\dlib\\build\\lib.win32-3.7', '-DPYTHON_EXECUTABLE=C:\\Program Files (x86)\\Pyth
on37-32\\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\Users\\YOSIF
A~1\\AppData\\Local\\Temp\\pip-install-j8dowk8r\\dlib\\build\\lib.win32-3.7']' r
eturned non-zero exit status 1.
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Program Files (x86)\Python37-
32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\U
sers\\YOSIFA~1\\AppData\\Local\\Temp\\pip-install-j8dowk8r\\dlib\\setup.py'"'"';
__file__='"'"'C:\\Users\\YOSIFA~1\\AppData\\Local\\Temp\\pip-install-j8dowk8r\\
dlib\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.r
ead().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file_
_, '"'"'exec'"'"'))' install --record 'C:\Users\YOSIFA~1\AppData\Local\Temp\pip-
record-6s43j4hs\install-record.txt' --single-version-externally-managed --compil
e Check the logs for full command output.
I did install Python 64 bit, Any idea what can be the problem? Why I'm still getting this error?
Dlib is support with python 3.6 to 3.7.0 version s.Try to install the dlib in anaconda prompt by following command.,
step 1:
conda create -n env_name python=3.7.0
step 2:
conda activate env_name
step 3:
conda install -c conda-forge dlib=19.17
-c is stands for channel, conda-forge is one of channels.
you can find all supported packages for conda's in this link https://repo.anaconda.com/pkgs/main/win-64/
Anaconda is available from, https://www.anaconda.com/distribution/#download-section
conda instruction are, https://docs.conda.io/projects/conda/en/4.6.0/_downloads/52a95608c49671267e40c689e0bc00ca/conda-cheatsheet.pdf
I have a big problem with dlib installation every time I try pip install dlib it gives me this huge error. I tried downloading packages upgrading system visual studio 2019 or c++ for cmake.
My operating system is Windows 7 64bit and I use Python 3.7.
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\>pip install dlib
Collecting dlib
Using cached https://files.pythonhosted.org/packages/05/57/e8a8caa3c89a27f80bc
78da39c423e2553f482a3705adc619176a3a24b36/dlib-19.17.0.tar.gz
Installing collected packages: dlib
Running setup.py install for dlib ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\\appdata\local\programs\python\python37-32\python.e
xe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\
\\AppData\\Local\\Temp\\pip-install-8scxhav9\\dlib\\setup.py'"'"'; __file__='"'"
'C:\\Users\\\\AppData\\Local\\Temp\\pip-install-8scxhav9\\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 'C:\Users\\AppData\Local\Temp\pip-record-hqcpwy4g\inst
all-record.txt' --single-version-externally-managed --compile
cwd: C:\Users\\AppData\Local\Temp\pip-install-8scxhav9\dlib\
Complete output (66 lines):
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.7.1 (v3.7.1:260ec2c36a, Oct 20 2018, 14:05:1
6) [MSC v.1915 32 bit (Intel)]
Invoking CMake setup: 'cmake C:\Users\\AppData\Local\Temp\pip-install-8
scxhav9\dlib\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\\AppDat
a\Local\Temp\pip-install-8scxhav9\dlib\build\lib.win32-3.7 -DPYTHON_EXECUTABLE=c
:\users\\appdata\local\programs\python\python37-32\python.exe -DCMAKE_LIBRA
RY_OUTPUT_DIRECTORY_RELEASE=C:\Users\\AppData\Local\Temp\pip-install-8scxha
v9\dlib\build\lib.win32-3.7'
-- Building for: Visual Studio 16 2019
-- Selecting Windows SDK version 10.0.18362.0 to target Windows 6.1.7601.
-- The C compiler identification is MSVC 19.22.27905.0
-- The CXX compiler identification is MSVC 19.22.27905.0
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Stu
dio/2019/Community/VC/Tools/MSVC/14.22.27905/bin/Hostx64/x64/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Stu
dio/2019/Community/VC/Tools/MSVC/14.22.27905/bin/Hostx64/x64/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual S
tudio/2019/Community/VC/Tools/MSVC/14.22.27905/bin/Hostx64/x64/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual S
tudio/2019/Community/VC/Tools/MSVC/14.22.27905/bin/Hostx64/x64/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PythonInterp: C:/Users//AppData/Local/Programs/Python/Python37
-32/python.exe (found version "3.7.1")
CMake Error at C:/Users//AppData/Local/Temp/pip-install-8scxhav9/dlib/d
lib/external/pybind11/tools/FindPythonLibsNew.cmake:122 (message):
Python config failure: Python is 32-bit, chosen compiler is 64-bit
Call Stack (most recent call first):
C:/Users//AppData/Local/Temp/pip-install-8scxhav9/dlib/dlib/external/
pybind11/tools/pybind11Tools.cmake:16 (find_package)
C:/Users//AppData/Local/Temp/pip-install-8scxhav9/dlib/dlib/external/
pybind11/CMakeLists.txt:33 (include)
-- Configuring incomplete, errors occurred!
See also "C:/Users//AppData/Local/Temp/pip-install-8scxhav9/dlib/build/
temp.win32-3.7/Release/CMakeFiles/CMakeOutput.log".
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\\AppData\Local\Temp\pip-install-8scxhav9\dlib\setup.py
", line 261, in <module>
'Topic :: Software Development',
File "c:\users\\appdata\local\programs\python\python37-32\lib\site-pa
ckages\setuptools\__init__.py", line 143, in setup
return distutils.core.setup(**attrs)
File "c:\users\\appdata\local\programs\python\python37-32\lib\distuti
ls\core.py", line 148, in setup
dist.run_commands()
File "c:\users\\appdata\local\programs\python\python37-32\lib\distuti
ls\dist.py", line 966, in run_commands
self.run_command(cmd)
File "c:\users\\appdata\local\programs\python\python37-32\lib\distuti
ls\dist.py", line 985, in run_command
cmd_obj.run()
File "c:\users\\appdata\local\programs\python\python37-32\lib\site-pa
ckages\setuptools\command\install.py", line 61, in run
return orig.install.run(self)
File "c:\users\\appdata\local\programs\python\python37-32\lib\distuti
ls\command\install.py", line 545, in run
self.run_command('build')
File "c:\users\\appdata\local\programs\python\python37-32\lib\distuti
ls\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\users\\appdata\local\programs\python\python37-32\lib\distuti
ls\dist.py", line 985, in run_command
cmd_obj.run()
File "c:\users\\appdata\local\programs\python\python37-32\lib\distuti
ls\command\build.py", line 135, in run
self.run_command(cmd_name)
File "c:\users\\appdata\local\programs\python\python37-32\lib\distuti
ls\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\users\\appdata\local\programs\python\python37-32\lib\distuti
ls\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\\AppData\Local\Temp\pip-install-8scxhav9\dlib\setup.py
", line 135, in run
self.build_extension(ext)
File "C:\Users\\AppData\Local\Temp\pip-install-8scxhav9\dlib\setup.py
", line 172, in build_extension
subprocess.check_call(cmake_setup, cwd=build_folder)
File "c:\users\\appdata\local\programs\python\python37-32\lib\subproc
ess.py", line 341, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'C:\\Users\\\\AppData
\\Local\\Temp\\pip-install-8scxhav9\\dlib\\tools\\python', '-DCMAKE_LIBRARY_OUTP
UT_DIRECTORY=C:\\Users\\\\AppData\\Local\\Temp\\pip-install-8scxhav9\\dlib\
\build\\lib.win32-3.7', '-DPYTHON_EXECUTABLE=c:\\users\\\\appdata\\local\\p
rograms\\python\\python37-32\\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_REL
EASE=C:\\Users\\\\AppData\\Local\\Temp\\pip-install-8scxhav9\\dlib\\build\\
lib.win32-3.7']' returned non-zero exit status 1.
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\\appdata\local\pro
grams\python\python37-32\python.exe' -u -c 'import sys, setuptools, tokenize; sy
s.argv[0] = '"'"'C:\\Users\\\\AppData\\Local\\Temp\\pip-install-8scxhav9\\d
lib\\setup.py'"'"'; __file__='"'"'C:\\Users\\\\AppData\\Local\\Temp\\pip-in
stall-8scxhav9\\dlib\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__
file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compi
le(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\\AppData\Lo
cal\Temp\pip-record-hqcpwy4g\install-record.txt' --single-version-externally-man
aged --compile Check the logs for full command output.
If you are already installed Anaconda, Try this
conda install -c conda-forge dlib
Since dlib in conda-forge is the latest one. I hope this solution can help you solve the problem. :)
I am a beginner in the Python programming language. I am Working on a project for facial landmark detection in Python. For this I am trying to use dlib.
I am using PyCharm IDE for Python programming language, but when I am trying to install dlib library on my PyCharm package then I am getting the following error.
Can anyone please help me solving this.
Edit:
Here is the complete error that I am getting.
**Collecting dlib
Using cached https://files.pythonhosted.org/packages/05/57/e8a8caa3c89a27f80bc78da39c423e2553f482a3705adc619176a3a24b36/dlib-19.17.0.tar.gz
Installing collected packages: dlib
Running setup.py install for dlib: started
Running setup.py install for dlib: finished with status 'error'
Complete output from command /Users/mayanktiwari/human_detect/untitled/bin/python -u -c "import setuptools, tokenize;file='/private/var/folders/ww/21lp_4013plfs5g1ym7wh39h0000gn/T/pycharm-packaging/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/ww/21lp_4013plfs5g1ym7wh39h0000gn/T/pip-record-hq673j64/install-record.txt --single-version-externally-managed --compile --install-headers /Users/mayanktiwari/human_detect/untitled/include/site/python3.7/dlib:
running install
running build
running build_py
package init file 'dlib/init.py' not found (or not a regular file)
warning: build_py: byte-compiling is disabled, skipping.
running build_ext
Building extension for Python 3.7.2 (default, Dec 27 2018, 07:35:52)
Invoking CMake setup: 'cmake /private/var/folders/ww/21lp_4013plfs5g1ym7wh39h0000gn/T/pycharm-packaging/dlib/tools/python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/private/var/folders/ww/21lp_4013plfs5g1ym7wh39h0000gn/T/pycharm-packaging/dlib/build/lib.macosx-10.13-x86_64-3.7 -DPYTHON_EXECUTABLE=/Users/mayanktiwari/human_detect/untitled/bin/python -DCMAKE_BUILD_TYPE=Release'
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- broken
CMake Error at /usr/local/Cellar/cmake/3.13.2/share/cmake/Modules/CMakeTestCCompiler.cmake:52 (message):
The C compiler
"/usr/bin/cc"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: /private/var/folders/ww/21lp_4013plfs5g1ym7wh39h0000gn/T/pycharm-packaging/dlib/build/temp.macosx-10.13-x86_64-3.7/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_dc7d9/fast"
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
CMake will not be able to correctly generate this project.
-- Configuring incomplete, errors occurred!
See also "/private/var/folders/ww/21lp_4013plfs5g1ym7wh39h0000gn/T/pycharm-packaging/dlib/build/temp.macosx-10.13-x86_64-3.7/CMakeFiles/CMakeOutput.log".
See also "/private/var/folders/ww/21lp_4013plfs5g1ym7wh39h0000gn/T/pycharm-packaging/dlib/build/temp.macosx-10.13-x86_64-3.7/CMakeFiles/CMakeError.log".
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/ww/21lp_4013plfs5g1ym7wh39h0000gn/T/pycharm-packaging/dlib/setup.py", line 261, in <module>
'Topic :: Software Development',
File "/Users/mayanktiwari/human_detect/untitled/lib/python3.7/site-packages/setuptools-40.8.0-py3.7.egg/setuptools/__init__.py", line 145, in setup
File "/usr/local/Cellar/python/3.7.2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/local/Cellar/python/3.7.2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/usr/local/Cellar/python/3.7.2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/Users/mayanktiwari/human_detect/untitled/lib/python3.7/site-packages/setuptools-40.8.0-py3.7.egg/setuptools/command/install.py", line 61, in run
File "/usr/local/Cellar/python/3.7.2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/command/install.py", line 545, in run
self.run_command('build')
File "/usr/local/Cellar/python/3.7.2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/local/Cellar/python/3.7.2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/usr/local/Cellar/python/3.7.2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/usr/local/Cellar/python/3.7.2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/local/Cellar/python/3.7.2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/private/var/folders/ww/21lp_4013plfs5g1ym7wh39h0000gn/T/pycharm-packaging/dlib/setup.py", line 135, in run
self.build_extension(ext)
File "/private/var/folders/ww/21lp_4013plfs5g1ym7wh39h0000gn/T/pycharm-packaging/dlib/setup.py", line 172, in build_extension
subprocess.check_call(cmake_setup, cwd=build_folder)
File "/usr/local/Cellar/python/3.7.2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 347, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '/private/var/folders/ww/21lp_4013plfs5g1ym7wh39h0000gn/T/pycharm-packaging/dlib/tools/python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/private/var/folders/ww/21lp_4013plfs5g1ym7wh39h0000gn/T/pycharm-packaging/dlib/build/lib.macosx-10.13-x86_64-3.7', '-DPYTHON_EXECUTABLE=/Users/mayanktiwari/human_detect/untitled/bin/python', '-DCMAKE_BUILD_TYPE=Release']' returned non-zero exit status 1.
----------------------------------------
Command "/Users/mayanktiwari/human_detect/untitled/bin/python -u -c "import setuptools, tokenize;file='/private/var/folders/ww/21lp_4013plfs5g1ym7wh39h0000gn/T/pycharm-packaging/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/ww/21lp_4013plfs5g1ym7wh39h0000gn/T/pip-record-hq673j64/install-record.txt --single-version-externally-managed --compile --install-headers /Users/mayanktiwari/human_detect/untitled/include/site/python3.7/dlib" failed with error code 1 in /private/var/folders/ww/21lp_4013plfs5g1ym7wh39h0000gn/T/pycharm-packaging/dlib/**
conda install cmake
Then
pip install dlib
It works for me.
I have found the answer to this question. We just need to follow simple steps to install dlib in Python.
Install Python
Install Pycharm
Install Anaconda
Open anaconda, create a new enviornment, and then execute the following commands in the same order.
conda update conda
conda update anaconda
conda install cmake
conda install -c conda-forge dlib
Now in this way you can install dlib on anaconda's virtual enviornment. Next you can access this virtual enviornment inside your Pycharm editor.