Related
Im trying to installing dlib on python 3.7 but it always failed
I've installed the cmake and add it to my environment, i've upgraded my pip into the latest version,
but everytime i run
pip install dlib
It returns error as
Collecting dlib
Using cached dlib-19.19.0.tar.gz (3.2 MB)
Installing collected packages: dlib
Running setup.py install for dlib ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\charles\appdata\local\programs\python\python37\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Charles\\AppData\\Local\\Temp\\pip-install-6wd_c0pw\\dlib\\setup.py'"'"'; __file__='"'"'C:\\Users\\Charles\\AppData\\Local\\Temp\\pip-install-6wd_c0pw\\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\Charles\AppData\Local\Temp\pip-record-xchasbrx\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\charles\appdata\local\programs\python\python37\Include\dlib'
cwd: C:\Users\Charles\AppData\Local\Temp\pip-install-6wd_c0pw\dlib\
Complete output (74 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, 20:34:20) [MSC v.1916 64 bit (AMD64)]
Invoking CMake setup: 'cmake C:\Users\Charles\AppData\Local\Temp\pip-install-6wd_c0pw\dlib\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\Charles\AppData\Local\Temp\pip-install-6wd_c0pw\dlib\build\lib.win-amd64-3.7 -DPYTHON_EXECUTABLE=c:\users\charles\appdata\local\programs\python\python37\python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\Charles\AppData\Local\Temp\pip-install-6wd_c0pw\dlib\build\lib.win-amd64-3.7 -A x64'
-- Building for: Visual Studio 10 2010
CMake Error at CMakeLists.txt:3 (project):
Failed to run MSBuild command:
C:/Windows/Microsoft.NET/Framework/v4.0.30319/MSBuild.exe
to get the value of VCTargetsPath:
Microsoft (R) Build Engine version 4.8.3752.0
[Microsoft .NET Framework, version 4.0.30319.42000]
Copyright (C) Microsoft Corporation. All rights reserved.
Build started 2/7/2020 12:37:32 PM.
Project "C:\Users\Charles\AppData\Local\Temp\pip-install-6wd_c0pw\dlib\build\temp.win-amd64-3.7\Release\CMakeFiles\3.16.3\VCTargetsPath.vcxproj" on node 1 (default targets).
C:\Users\Charles\AppData\Local\Temp\pip-install-6wd_c0pw\dlib\build\temp.win-amd64-3.7\Release\CMakeFiles\3.16.3\VCTargetsPath.vcxproj(14,2): error MSB4019: The imported project "C:\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\Charles\AppData\Local\Temp\pip-install-6wd_c0pw\dlib\build\temp.win-amd64-3.7\Release\CMakeFiles\3.16.3\VCTargetsPath.vcxproj" (default targets) -- FAILED.
Build FAILED.
"C:\Users\Charles\AppData\Local\Temp\pip-install-6wd_c0pw\dlib\build\temp.win-amd64-3.7\Release\CMakeFiles\3.16.3\VCTargetsPath.vcxproj" (default target) (1) ->
C:\Users\Charles\AppData\Local\Temp\pip-install-6wd_c0pw\dlib\build\temp.win-amd64-3.7\Release\CMakeFiles\3.16.3\VCTargetsPath.vcxproj(14,2): error MSB4019: The imported project "C:\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:00.01
Exit code: 1
-- Configuring incomplete, errors occurred!
See also "C:/Users/Charles/AppData/Local/Temp/pip-install-6wd_c0pw/dlib/build/temp.win-amd64-3.7/Release/CMakeFiles/CMakeOutput.log".
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Charles\AppData\Local\Temp\pip-install-6wd_c0pw\dlib\setup.py", line 261, in <module>
'Topic :: Software Development',
File "c:\users\charles\appdata\local\programs\python\python37\lib\site-packages\setuptools\__init__.py", line 145, in setup
return distutils.core.setup(**attrs)
File "c:\users\charles\appdata\local\programs\python\python37\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "c:\users\charles\appdata\local\programs\python\python37\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "c:\users\charles\appdata\local\programs\python\python37\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "c:\users\charles\appdata\local\programs\python\python37\lib\site-packages\setuptools\command\install.py", line 61, in run
return orig.install.run(self)
File "c:\users\charles\appdata\local\programs\python\python37\lib\distutils\command\install.py", line 545, in run
self.run_command('build')
File "c:\users\charles\appdata\local\programs\python\python37\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\users\charles\appdata\local\programs\python\python37\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "c:\users\charles\appdata\local\programs\python\python37\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "c:\users\charles\appdata\local\programs\python\python37\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\users\charles\appdata\local\programs\python\python37\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\Charles\AppData\Local\Temp\pip-install-6wd_c0pw\dlib\setup.py", line 135, in run
self.build_extension(ext)
File "C:\Users\Charles\AppData\Local\Temp\pip-install-6wd_c0pw\dlib\setup.py", line 172, in build_extension
subprocess.check_call(cmake_setup, cwd=build_folder)
File "c:\users\charles\appdata\local\programs\python\python37\lib\subprocess.py", line 347, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'C:\\Users\\Charles\\AppData\\Local\\Temp\\pip-install-6wd_c0pw\\dlib\\tools\\python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\\Users\\Charles\\AppData\\Local\\Temp\\pip-install-6wd_c0pw\\dlib\\build\\lib.win-amd64-3.7', '-DPYTHON_EXECUTABLE=c:\\users\\charles\\appdata\\local\\programs\\python\\python37\\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\Users\\Charles\\AppData\\Local\\Temp\\pip-install-6wd_c0pw\\dlib\\build\\lib.win-amd64-3.7', '-A', 'x64']' returned non-zero exit status 1.
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\charles\appdata\local\programs\python\python37\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Charles\\AppData\\Local\\Temp\\pip-install-6wd_c0pw\\dlib\\setup.py'"'"'; __file__='"'"'C:\\Users\\Charles\\AppData\\Local\\Temp\\pip-install-6wd_c0pw\\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\Charles\AppData\Local\Temp\pip-record-xchasbrx\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\charles\appdata\local\programs\python\python37\Include\dlib' Check the logs for full command output.
i also installed it by:
go here https://pypi.org/simple/dlib/
pick dlib-19.18.0.tar.gz
extract it, and go into the folder
open command line then run python setup.py install
it returns:
running install
running bdist_egg
running egg_info
writing dlib.egg-info\PKG-INFO
writing dependency_links to dlib.egg-info\dependency_links.txt
writing top-level names to dlib.egg-info\top_level.txt
package init file 'dlib\__init__.py' not found (or not a regular file)
reading manifest file 'dlib.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
no previously-included directories found matching 'tools\python\build*'
no previously-included directories found matching 'dlib\test'
writing manifest file 'dlib.egg-info\SOURCES.txt'
installing library code to build\bdist.win-amd64\egg
running install_lib
running build_py
running build_ext
Building extension for Python 3.7.4 (tags/v3.7.4:e09359112e, Jul 8 2019, 20:34:20) [MSC v.1916 64 bit (AMD64)]
Invoking CMake setup: 'cmake C:\Users\Charles\Downloads\dlib-19.18.0.tar\dist\dlib-19.18.0\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\Charles\Downloads\dlib-19.18.0.tar\dist\dlib-19.18.0\build\lib.win-amd64-3.7 -DPYTHON_EXECUTABLE=C:\Users\Charles\AppData\Local\Programs\Python\Python37\python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\Charles\Downloads\dlib-19.18.0.tar\dist\dlib-19.18.0\build\lib.win-amd64-3.7 -A x64'
CMake Error at CMakeLists.txt:3 (project):
Failed to run MSBuild command:
C:/Windows/Microsoft.NET/Framework/v4.0.30319/MSBuild.exe
to get the value of VCTargetsPath:
Microsoft (R) Build Engine version 4.8.3752.0
[Microsoft .NET Framework, version 4.0.30319.42000]
Copyright (C) Microsoft Corporation. All rights reserved.
Build started 2/7/2020 12:21:15 PM.
Project "C:\Users\Charles\Downloads\dlib-19.18.0.tar\dist\dlib-19.18.0\build\temp.win-amd64-3.7\Release\CMakeFiles\3.16.3\VCTargetsPath.vcxproj" on node 1 (default targets).
C:\Users\Charles\Downloads\dlib-19.18.0.tar\dist\dlib-19.18.0\build\temp.win-amd64-3.7\Release\CMakeFiles\3.16.3\VCTargetsPath.vcxproj(14,2): error MSB4019: The imported project "C:\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\Charles\Downloads\dlib-19.18.0.tar\dist\dlib-19.18.0\build\temp.win-amd64-3.7\Release\CMakeFiles\3.16.3\VCTargetsPath.vcxproj" (default targets) -- FAILED.
Build FAILED.
"C:\Users\Charles\Downloads\dlib-19.18.0.tar\dist\dlib-19.18.0\build\temp.win-amd64-3.7\Release\CMakeFiles\3.16.3\VCTargetsPath.vcxproj" (default target) (1) ->
C:\Users\Charles\Downloads\dlib-19.18.0.tar\dist\dlib-19.18.0\build\temp.win-amd64-3.7\Release\CMakeFiles\3.16.3\VCTargetsPath.vcxproj(14,2): error MSB4019: The imported project "C:\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:00.06
Exit code: 1
-- Configuring incomplete, errors occurred!
See also "C:/Users/Charles/Downloads/dlib-19.18.0.tar/dist/dlib-19.18.0/build/temp.win-amd64-3.7/Release/CMakeFiles/CMakeOutput.log".
Traceback (most recent call last):
File "setup.py", line 261, in <module>
'Topic :: Software Development',
File "C:\Users\Charles\AppData\Local\Programs\Python\Python37\lib\site-packages\setuptools\__init__.py", line 145, in setup
return distutils.core.setup(**attrs)
File "C:\Users\Charles\AppData\Local\Programs\Python\Python37\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Users\Charles\AppData\Local\Programs\Python\Python37\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "C:\Users\Charles\AppData\Local\Programs\Python\Python37\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\Charles\AppData\Local\Programs\Python\Python37\lib\site-packages\setuptools\command\install.py", line 67, in run
self.do_egg_install()
File "C:\Users\Charles\AppData\Local\Programs\Python\Python37\lib\site-packages\setuptools\command\install.py", line 109, in do_egg_install
self.run_command('bdist_egg')
File "C:\Users\Charles\AppData\Local\Programs\Python\Python37\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Users\Charles\AppData\Local\Programs\Python\Python37\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\Charles\AppData\Local\Programs\Python\Python37\lib\site-packages\setuptools\command\bdist_egg.py", line 172, in run
cmd = self.call_command('install_lib', warn_dir=0)
File "C:\Users\Charles\AppData\Local\Programs\Python\Python37\lib\site-packages\setuptools\command\bdist_egg.py", line 158, in call_command
self.run_command(cmdname)
File "C:\Users\Charles\AppData\Local\Programs\Python\Python37\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Users\Charles\AppData\Local\Programs\Python\Python37\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\Charles\AppData\Local\Programs\Python\Python37\lib\site-packages\setuptools\command\install_lib.py", line 11, in run
self.build()
File "C:\Users\Charles\AppData\Local\Programs\Python\Python37\lib\distutils\command\install_lib.py", line 107, in build
self.run_command('build_ext')
File "C:\Users\Charles\AppData\Local\Programs\Python\Python37\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Users\Charles\AppData\Local\Programs\Python\Python37\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "setup.py", line 135, in run
self.build_extension(ext)
File "setup.py", line 172, in build_extension
subprocess.check_call(cmake_setup, cwd=build_folder)
File "C:\Users\Charles\AppData\Local\Programs\Python\Python37\lib\subprocess.py", line 347, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'C:\\Users\\Charles\\Downloads\\dlib-19.18.0.tar\\dist\\dlib-19.18.0\\tools\\python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\\Users\\Charles\\Downloads\\dlib-19.18.0.tar\\dist\\dlib-19.18.0\\build\\lib.win-amd64-3.7', '-DPYTHON_EXECUTABLE=C:\\Users\\Charles\\AppData\\Local\\Programs\\Python\\Python37\\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\Users\\Charles\\Downloads\\dlib-19.18.0.tar\\dist\\dlib-19.18.0\\build\\lib.win-amd64-3.7', '-A', 'x64']' returned non-zero exit status 1.
i also tried install it from source as :
python -m pip install https://files.pythonhosted.org/packages/1e/62/aacb236d21fbd08148b1d517d58a9d80ea31bdcd386d26f21f8b23b1eb28/dlib-19.18.0.tar.gz#sha256=8ca127253a0ca82a3d847148515f82ff2c504ed77a6385ec4f38c7f8e5360860
it returning error as
Collecting https://files.pythonhosted.org/packages/1e/62/aacb236d21fbd08148b1d517d58a9d80ea31bdcd386d26f21f8b23b1eb28/dlib-19.18.0.tar.gz#sha256=8ca127253a0ca82a3d847148515f82ff2c504ed77a6385ec4f38c7f8e5360860
Using cached dlib-19.18.0.tar.gz (3.1 MB)
Installing collected packages: dlib
Running setup.py install for dlib ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\Charles\AppData\Local\Programs\Python\Python37\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Charles\\AppData\\Local\\Temp\\pip-req-build-k3302dt_\\setup.py'"'"'; __file__='"'"'C:\\Users\\Charles\\AppData\\Local\\Temp\\pip-req-build-k3302dt_\\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\Charles\AppData\Local\Temp\pip-record-waso8gw6\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\Charles\AppData\Local\Programs\Python\Python37\Include\dlib'
cwd: C:\Users\Charles\AppData\Local\Temp\pip-req-build-k3302dt_\
Complete output (74 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, 20:34:20) [MSC v.1916 64 bit (AMD64)]
Invoking CMake setup: 'cmake C:\Users\Charles\AppData\Local\Temp\pip-req-build-k3302dt_\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\Charles\AppData\Local\Temp\pip-req-build-k3302dt_\build\lib.win-amd64-3.7 -DPYTHON_EXECUTABLE=C:\Users\Charles\AppData\Local\Programs\Python\Python37\python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\Charles\AppData\Local\Temp\pip-req-build-k3302dt_\build\lib.win-amd64-3.7 -A x64'
-- Building for: Visual Studio 10 2010
CMake Error at CMakeLists.txt:3 (project):
Failed to run MSBuild command:
C:/Windows/Microsoft.NET/Framework/v4.0.30319/MSBuild.exe
to get the value of VCTargetsPath:
Microsoft (R) Build Engine version 4.8.3752.0
[Microsoft .NET Framework, version 4.0.30319.42000]
Copyright (C) Microsoft Corporation. All rights reserved.
Build started 2/7/2020 12:53:19 PM.
Project "C:\Users\Charles\AppData\Local\Temp\pip-req-build-k3302dt_\build\temp.win-amd64-3.7\Release\CMakeFiles\3.16.3\VCTargetsPath.vcxproj" on node 1 (default targets).
C:\Users\Charles\AppData\Local\Temp\pip-req-build-k3302dt_\build\temp.win-amd64-3.7\Release\CMakeFiles\3.16.3\VCTargetsPath.vcxproj(14,2): error MSB4019: The imported project "C:\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\Charles\AppData\Local\Temp\pip-req-build-k3302dt_\build\temp.win-amd64-3.7\Release\CMakeFiles\3.16.3\VCTargetsPath.vcxproj" (default targets) -- FAILED.
Build FAILED.
"C:\Users\Charles\AppData\Local\Temp\pip-req-build-k3302dt_\build\temp.win-amd64-3.7\Release\CMakeFiles\3.16.3\VCTargetsPath.vcxproj" (default target) (1) ->
C:\Users\Charles\AppData\Local\Temp\pip-req-build-k3302dt_\build\temp.win-amd64-3.7\Release\CMakeFiles\3.16.3\VCTargetsPath.vcxproj(14,2): error MSB4019: The imported project "C:\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:00.01
Exit code: 1
-- Configuring incomplete, errors occurred!
See also "C:/Users/Charles/AppData/Local/Temp/pip-req-build-k3302dt_/build/temp.win-amd64-3.7/Release/CMakeFiles/CMakeOutput.log".
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Charles\AppData\Local\Temp\pip-req-build-k3302dt_\setup.py", line 261, in <module>
'Topic :: Software Development',
File "C:\Users\Charles\AppData\Local\Programs\Python\Python37\lib\site-packages\setuptools\__init__.py", line 145, in setup
return distutils.core.setup(**attrs)
File "C:\Users\Charles\AppData\Local\Programs\Python\Python37\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Users\Charles\AppData\Local\Programs\Python\Python37\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "C:\Users\Charles\AppData\Local\Programs\Python\Python37\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\Charles\AppData\Local\Programs\Python\Python37\lib\site-packages\setuptools\command\install.py", line 61, in run
return orig.install.run(self)
File "C:\Users\Charles\AppData\Local\Programs\Python\Python37\lib\distutils\command\install.py", line 545, in run
self.run_command('build')
File "C:\Users\Charles\AppData\Local\Programs\Python\Python37\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Users\Charles\AppData\Local\Programs\Python\Python37\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\Charles\AppData\Local\Programs\Python\Python37\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "C:\Users\Charles\AppData\Local\Programs\Python\Python37\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Users\Charles\AppData\Local\Programs\Python\Python37\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\Charles\AppData\Local\Temp\pip-req-build-k3302dt_\setup.py", line 135, in run
self.build_extension(ext)
File "C:\Users\Charles\AppData\Local\Temp\pip-req-build-k3302dt_\setup.py", line 172, in build_extension
subprocess.check_call(cmake_setup, cwd=build_folder)
File "C:\Users\Charles\AppData\Local\Programs\Python\Python37\lib\subprocess.py", line 347, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'C:\\Users\\Charles\\AppData\\Local\\Temp\\pip-req-build-k3302dt_\\tools\\python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\\Users\\Charles\\AppData\\Local\\Temp\\pip-req-build-k3302dt_\\build\\lib.win-amd64-3.7', '-DPYTHON_EXECUTABLE=C:\\Users\\Charles\\AppData\\Local\\Programs\\Python\\Python37\\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\Users\\Charles\\AppData\\Local\\Temp\\pip-req-build-k3302dt_\\build\\lib.win-amd64-3.7', '-A', 'x64']' returned non-zero exit status 1.
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\Charles\AppData\Local\Programs\Python\Python37\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Charles\\AppData\\Local\\Temp\\pip-req-build-k3302dt_\\setup.py'"'"'; __file__='"'"'C:\\Users\\Charles\\AppData\\Local\\Temp\\pip-req-build-k3302dt_\\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\Charles\AppData\Local\Temp\pip-record-waso8gw6\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\Charles\AppData\Local\Programs\Python\Python37\Include\dlib' Check the logs for full command output.
Im so lost, any response or suggestions will be appreciated so much. Thank you
You have figured it out yourself, but I wanted to add some remarks on your installation methods:
pip install dlib
As there is only the tar.gz on pypi, it downloads that and then tries to run setup.py after installing the reuqirements
Therefore, you manually doing the tar.gz, extracting it and running python setup.py install is the same thing as the first command and also
python -m pip install https://files.pythonhosted.org/packages/1e/62/aacb236d21fbd08148b1d517d58a9d80ea31bdcd386d26f21f8b23b1eb28/dlib-19.18.0.tar.gz
Is doing the same in the end, trying to run setup.py to install.
In this case it involves the compilation of c/c++ code which requires for the right compiler/build tools to be installed which pip cannot take care of. It is not built for this task.
Solved by installing VS with C++.
Please set your compiler path variable:
export CC=/usr/bin/gcc
and then do pip install dlib again. It should work. You might also want to check in usr/bin the right path to gcc.
Python 3.6 (64 bit) has to be already installed.
Run Windows Prompt Command.
You can type on the search bar “CMD”.
Remember to click with right button of the mouse and then “Run it as administrator”, otherwise you might not have the permission to install the library.
Type on the prompt command
python -m pip install https://files.pythonhosted.org/packages/0e/ce/f8a3cff33ac03a8219768f0694c5d703c8e037e6aba2e865f9bae22ed63c/dlib-19.8.1-cp36-cp36m-win_amd64.whl#sha256=794994fa2c54e7776659fddb148363a5556468a6d5d46be8dad311722d54bfcf
4. Once you see the message “Successfully installed dlib“, it means that the installation has been completed
I am trying to install python package Nlopt, which is a requirement for Semi-Supervised learning package semisup-learn. But getting this error in the command line. I checked other installing issues with Nlopt, but I didn't find the solution for this. In its Github nobody has raised this issue, so it looks like something is wrong with my computer side. Could anybody tell me what this error means and how to fix?
My python version: 3.6.8
MakotonoMacBook-ea:site-packages makotomiyazaki$ pip install nlopt
Collecting nlopt
Using cached https://files.pythonhosted.org/packages/7f/4f/de7e64a295e86c9f1ee382076019e0526247969353eb29345da1a05854b6/nlopt-2.4.2.post2.tar.gz
Requirement already satisfied: numpy in /Users/makotomiyazaki/anaconda3/lib/python3.6/site-packages (from nlopt) (1.16.4)
Building wheels for collected packages: nlopt
Building wheel for nlopt (setup.py) ... error
ERROR: Complete output from command /Users/makotomiyazaki/anaconda3/bin/python -u -c 'import setuptools, tokenize;__file__='"'"'/private/var/folders/_f/ds87hcrj1d3023gdtg72nb7w0000gn/T/pip-install-w15vucep/nlopt/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/_f/ds87hcrj1d3023gdtg72nb7w0000gn/T/pip-wheel-m3pr939i --python-tag cp36:
ERROR: running bdist_wheel
running build
running build_ext /private/var/folders/_f/ds87hcrj1d3023gdtg72nb7w0000gn/T/pip-install-w15vucep/nlopt/configure --prefix=/private/var/folders/_f/ds87hcrj1d3023gdtg72nb7w0000gn/T/pip-install-w15vucep/nlopt/build/temp.macosx-10.7-x86_64-3.6 --libdir=/private/var/folders/_f/ds87hcrj1d3023gdtg72nb7w0000gn/T/pip-install-w15vucep/nlopt/build/lib.macosx-10.7-x86_64-3.6 --enable-shared --without-guile --without-octave --without-matlab
extdir: /private/var/folders/_f/ds87hcrj1d3023gdtg72nb7w0000gn/T/pip-install-w15vucep/nlopt/build/lib.macosx-10.7-x86_64-3.6
build_temp: build/temp.macosx-10.7-x86_64-3.6
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /private/var/folders/_f/ds87hcrj1d3023gdtg72nb7w0000gn/T/pip-install-w15vucep/nlopt/install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... no
checking whether make supports nested variables... no
checking whether to enable maintainer-specific portions of
Makefiles... no
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/private/var/folders/_f/ds87hcrj1d3023gdtg72nb7w0000gn/T/pip-install-w15vucep/nlopt/build/temp.macosx-10.7-x86_64-3.6':
configure: error: C compiler cannot create executables
See `config.log' for more details
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/_f/ds87hcrj1d3023gdtg72nb7w0000gn/T/pip-install-w15vucep/nlopt/setup.py", line 124, in <module>
'Programming Language :: Python :: 3'
File "/Users/makotomiyazaki/anaconda3/lib/python3.6/site-packages/setuptools/__init__.py", line 129, in setup
return distutils.core.setup(**attrs)
File "/Users/makotomiyazaki/anaconda3/lib/python3.6/distutils/core.py", line 148, in setup
dist.run_commands()
File "/Users/makotomiyazaki/anaconda3/lib/python3.6/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/Users/makotomiyazaki/anaconda3/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/Users/makotomiyazaki/anaconda3/lib/python3.6/site-packages/wheel/bdist_wheel.py", line 179, in run
self.run_command('build')
File "/Users/makotomiyazaki/anaconda3/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/Users/makotomiyazaki/anaconda3/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/Users/makotomiyazaki/anaconda3/lib/python3.6/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/Users/makotomiyazaki/anaconda3/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/Users/makotomiyazaki/anaconda3/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/private/var/folders/_f/ds87hcrj1d3023gdtg72nb7w0000gn/T/pip-install-w15vucep/nlopt/setup.py", line 37, in run
self.build_extension(ext)
File "/private/var/folders/_f/ds87hcrj1d3023gdtg72nb7w0000gn/T/pip-install-w15vucep/nlopt/setup.py", line 66, in build_extension
subprocess.check_call(config_cmd, cwd=self.build_temp, env=os.environ)
File "/Users/makotomiyazaki/anaconda3/lib/python3.6/subprocess.py", line 311, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/private/var/folders/_f/ds87hcrj1d3023gdtg72nb7w0000gn/T/pip-install-w15vucep/nlopt/configure', '--prefix=/private/var/folders/_f/ds87hcrj1d3023gdtg72nb7w0000gn/T/pip-install-w15vucep/nlopt/build/temp.macosx-10.7-x86_64-3.6', '--libdir=/private/var/folders/_f/ds87hcrj1d3023gdtg72nb7w0000gn/T/pip-install-w15vucep/nlopt/build/lib.macosx-10.7-x86_64-3.6', '--enable-shared', '--without-guile', '--without-octave', '--without-matlab']' returned non-zero exit status 77.
ERROR: Failed building wheel for nlopt
Running setup.py clean for nlopt
Failed to build nlopt
Installing collected packages: nlopt
Running setup.py install for nlopt ... error
ERROR: Complete output from command
/Users/makotomiyazaki/anaconda3/bin/python -u -c 'import setuptools, tokenize;__file__='"'"'/private/var/folders/_f/ds87hcrj1d3023gdtg72nb7w0000gn/T/pip-install-w15vucep/nlopt/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/_f/ds87hcrj1d3023gdtg72nb7w0000gn/T/pip-record-gzrc6abe/install-record.txt --single-version-externally-managed --compile:
ERROR: running install
running build
running build_ext
/private/var/folders/_f/ds87hcrj1d3023gdtg72nb7w0000gn/T/pip-install-w15vucep/nlopt/configure --prefix=/private/var/folders/_f/ds87hcrj1d3023gdtg72nb7w0000gn/T/pip-install-w15vucep/nlopt/build/temp.macosx-10.7-x86_64-3.6 --libdir=/private/var/folders/_f/ds87hcrj1d3023gdtg72nb7w0000gn/T/pip-install-w15vucep/nlopt/build/lib.macosx-10.7-x86_64-3.6 --enable-shared --without-guile --without-octave --without-matlab
extdir: /private/var/folders/_f/ds87hcrj1d3023gdtg72nb7w0000gn/T/pip-install-w15vucep/nlopt/build/lib.macosx-10.7-x86_64-3.6
build_temp: build/temp.macosx-10.7-x86_64-3.6
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /private/var/folders/_f/ds87hcrj1d3023gdtg72nb7w0000gn/T/pip-install-w15vucep/nlopt/install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... no
checking whether make supports nested variables... no
checking whether to enable maintainer-specific portions of Makefiles... no
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/private/var/folders/_f/ds87hcrj1d3023gdtg72nb7w0000gn/T/pip-install-w15vucep/nlopt/build/temp.macosx-10.7-x86_64-3.6':
configure: error: C compiler cannot create executables
See `config.log' for more details
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/_f/ds87hcrj1d3023gdtg72nb7w0000gn/T/pip-install-w15vucep/nlopt/setup.py", line 124, in <module>
'Programming Language :: Python :: 3'
File "/Users/makotomiyazaki/anaconda3/lib/python3.6/site-packages/setuptools/__init__.py", line 129, in setup
return distutils.core.setup(**attrs)
File "/Users/makotomiyazaki/anaconda3/lib/python3.6/distutils/core.py", line 148, in setup
dist.run_commands()
File "/Users/makotomiyazaki/anaconda3/lib/python3.6/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/Users/makotomiyazaki/anaconda3/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/Users/makotomiyazaki/anaconda3/lib/python3.6/site-packages/setuptools/command/install.py", line 61, in run
return orig.install.run(self)
File "/Users/makotomiyazaki/anaconda3/lib/python3.6/distutils/command/install.py", line 545, in run
self.run_command('build')
File "/Users/makotomiyazaki/anaconda3/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/Users/makotomiyazaki/anaconda3/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/Users/makotomiyazaki/anaconda3/lib/python3.6/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/Users/makotomiyazaki/anaconda3/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/Users/makotomiyazaki/anaconda3/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/private/var/folders/_f/ds87hcrj1d3023gdtg72nb7w0000gn/T/pip-install-w15vucep/nlopt/setup.py", line 37, in run
self.build_extension(ext)
File "/private/var/folders/_f/ds87hcrj1d3023gdtg72nb7w0000gn/T/pip-install-w15vucep/nlopt/setup.py", line 66, in build_extension
subprocess.check_call(config_cmd, cwd=self.build_temp, env=os.environ)
File "/Users/makotomiyazaki/anaconda3/lib/python3.6/subprocess.py", line 311, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/private/var/folders/_f/ds87hcrj1d3023gdtg72nb7w0000gn/T/pip-install-w15vucep/nlopt/configure', '--prefix=/private/var/folders/_f/ds87hcrj1d3023gdtg72nb7w0000gn/T/pip-install-w15vucep/nlopt/build/temp.macosx-10.7-x86_64-3.6', '--libdir=/private/var/folders/_f/ds87hcrj1d3023gdtg72nb7w0000gn/T/pip-install-w15vucep/nlopt/build/lib.macosx-10.7-x86_64-3.6', '--enable-shared', '--without-guile', '--without-octave', '--without-matlab']' returned non-zero exit status 77.
----------------------------------------
ERROR: Command "/Users/makotomiyazaki/anaconda3/bin/python -u -c 'import setuptools, tokenize;__file__='"'"'/private/var/folders/_f/ds87hcrj1d3023gdtg72nb7w0000gn/T/pip-install-w15vucep/nlopt/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/_f/ds87hcrj1d3023gdtg72nb7w0000gn/T/pip-record-gzrc6abe/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/_f/ds87hcrj1d3023gdtg72nb7w0000gn/T/pip-install-w15vucep/nlopt/
I can't seem to install dlib on my windows 10 machine using pip.
I am using python 3.6.1
i did try pip installing dlib using the following commands
pip install dlib
but it returns me with the following error.
Collecting dlib
Using cached dlib-19.10.0.tar.gz
Installing collected packages: dlib
Running setup.py install for dlib ... error
Complete output from command c:\users\ayush\appdata\local\programs\python \python36-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Ayush\\AppData\\Local\\Temp\\pip-build-iu6_cvvs\\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\Ayush\AppData\Local\Temp\pip-uhnfkgpd-record\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
Invoking CMake setup: 'cmake C:\Users\Ayush\AppData\Local\Temp\pip-build-iu6_cvvs\dlib\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\Ayush\AppData\Local\Temp\pip-build-iu6_cvvs\dlib\build\lib.win32-3.6 -DPYTHON_EXECUTABLE=c:\users\ayush\appdata\local\programs\python\python36-32\python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\Ayush\AppData\Local\Temp\pip-build-iu6_cvvs\dlib\build\lib.win32-3.6'
-- Building for: NMake Makefiles
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
CMake Error in CMakeLists.txt:
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.
CMake Error in CMakeLists.txt:
The CMAKE_CXX_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 "CXX" or the CMake cache entry CMAKE_CXX_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/Ayush/AppData/Local/Temp/pip-build-iu6_cvvs/dlib/build/temp.win32-3.6/Release/CMakeFiles/CMakeOutput.log".
See also "C:/Users/Ayush/AppData/Local/Temp/pip-build-iu6_cvvs/dlib/build/temp.win32-3.6/Release/CMakeFiles/CMakeError.log".
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Ayush\AppData\Local\Temp\pip-build-iu6_cvvs\dlib\setup.py", line 249, in <module>
'Topic :: Software Development',
File "c:\users\ayush\appdata\local\programs\python\python36-32\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "c:\users\ayush\appdata\local\programs\python\python36-32\lib\distutils\dist.py", line 955, in run_commands
self.run_command(cmd)
File "c:\users\ayush\appdata\local\programs\python\python36-32\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "c:\users\ayush\appdata\local\programs\python\python36-32\lib\site-packages\setuptools\command\install.py", line 61, in run
return orig.install.run(self)
File "c:\users\ayush\appdata\local\programs\python\python36-32\lib\distutils\command\install.py", line 545, in run
self.run_command('build')
File "c:\users\ayush\appdata\local\programs\python\python36-32\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\users\ayush\appdata\local\programs\python\python36-32\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "c:\users\ayush\appdata\local\programs\python\python36-32\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "c:\users\ayush\appdata\local\programs\python\python36-32\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\users\ayush\appdata\local\programs\python\python36-32\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Users\Ayush\AppData\Local\Temp\pip-build-iu6_cvvs\dlib\setup.py", line 129, in run
self.build_extension(ext)
File "C:\Users\Ayush\AppData\Local\Temp\pip-build-iu6_cvvs\dlib\setup.py", line 163, in build_extension
subprocess.check_call(cmake_setup, cwd=build_folder)
File "c:\users\ayush\appdata\local\programs\python\python36-32\lib\subprocess.py", line 291, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'C:\\Users\\Ayush\\AppData\\Local\\Temp\\pip-build-iu6_cvvs\\dlib\\tools\\python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\\Users\\Ayush\\AppData\\Local\\Temp\\pip-build-iu6_cvvs\\dlib\\build\\lib.win32-3.6', '-DPYTHON_EXECUTABLE=c:\\users\\ayush\\appdata\\local\\programs\\python\\python36-32\\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\Users\\Ayush\\AppData\\Local\\Temp\\pip-build-iu6_cvvs\\dlib\\build\\lib.win32-3.6']' returned non-zero exit status 1.
i have Cmake installed and i also tried setting a environmental variable path to the Cmake library but the same error occurs.
I try to install cython on windows 7 64bit ( Python 3.4.3 ) via
pip install cython
and ends with the error message
error: Microsoft Visual C++ 10.0 is required (Unable to find vcvarsall.bat).
Which I find kinda strange since I have visual studio community 2013 installed.
When I ask windows where vcvarsall.bat is it kindly answers me
C:\Users\me>where vcvarsall.bat
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat
So it is in my path. Do I need a different visual studio version and with that a different version of vcvarsall.bat?
Edit 1
I downloaded the VS2010 ISO SonicARG provided. Thank you.
Now cython acknowledges the compiler, but still fails to install.
pip install cython
Running setup.py install for cython
Complete output from command C:\Python34\python.exe -c "import setuptools, tokenize;__file__='C:\\Users\\me\\AppData\\Local\\Temp\\pip-build-12j3y7gp\\cython\\setup.py';exec(compile(getattr(t
okenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record C:\Users\me\AppData\Local\Temp\pip-lgya62cy-record\install-record.txt --single-version-external
ly-managed --compile:
Unable to find pgen, not compiling formal grammar.
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.4
copying cython.py -> build\lib.win-amd64-3.4
creating build\lib.win-amd64-3.4\Cython
copying Cython\CodeWriter.py -> build\lib.win-amd64-3.4\Cython
[Many lines of copying and creating]
copying Cython\Debugger\Tests\cfuncs.c -> build\lib.win-amd64-3.4\Cython\Debugger\Tests
running build_ext
cythoning C:\Users\me\AppData\Local\Temp\pip-build-12j3y7gp\cython\Cython\Plex\Scanners.py to C:\Users\me\AppData\Local\Temp\pip-build-12j3y7gp\cython\Cython\Plex\Scanners.c
building 'Cython.Plex.Scanners' extension
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\me\AppData\Local\Temp\pip-build-12j3y7gp\cython\setup.py", line 357, in <module>
**setup_args
File "C:\Python34\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Python34\lib\distutils\dist.py", line 955, in run_commands
self.run_command(cmd)
File "C:\Python34\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Python34\lib\site-packages\setuptools\command\install.py", line 61, in run
return orig.install.run(self)
File "C:\Python34\lib\distutils\command\install.py", line 539, in run
self.run_command('build')
File "C:\Python34\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Python34\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Python34\lib\distutils\command\build.py", line 126, in run
self.run_command(cmd_name)
File "C:\Python34\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Python34\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Users\me\AppData\Local\Temp\pip-build-12j3y7gp\cython\Cython\Distutils\build_ext.py", line 164, in run
_build_ext.build_ext.run(self)
File "C:\Python34\lib\distutils\command\build_ext.py", line 339, in run
self.build_extensions()
File "C:\Users\me\AppData\Local\Temp\pip-build-12j3y7gp\cython\setup.py", line 192, in build_extensions
build_ext_orig.build_extensions(self)
File "C:\Users\me\AppData\Local\Temp\pip-build-12j3y7gp\cython\Cython\Distutils\build_ext.py", line 172, in build_extensions
self.build_extension(ext)
File "C:\Python34\lib\distutils\command\build_ext.py", line 503, in build_extension
depends=ext.depends)
File "C:\Python34\lib\distutils\msvc9compiler.py", line 460, in compile
self.initialize()
File "C:\Python34\lib\distutils\msvc9compiler.py", line 371, in initialize
vc_env = query_vcvarsall(VERSION, plat_spec)
File "C:\Python34\lib\site-packages\setuptools\msvc9_support.py", line 52, in query_vcvarsall
return unpatched['query_vcvarsall'](version, *args, **kwargs)
File "C:\Python34\lib\distutils\msvc9compiler.py", line 287, in query_vcvarsall
raise ValueError(str(list(result.keys())))
ValueError: ['path']
----------------------------------------
Command "C:\Python34\python.exe -c "import setuptools, tokenize;__file__='C:\\Users\\me\\AppData\\Local\\Temp\\pip-build-12j3y7gp\\cython\\setup.py';exec(compile(getattr(tokenize, 'open', open)(_
_file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record C:\Users\me\AppData\Local\Temp\pip-lgya62cy-record\install-record.txt --single-version-externally-managed --compile" fa
iled with error code 1 in C:\Users\me\AppData\Local\Temp\pip-build-12j3y7gp\cython
Python 3.4 is built against Microsoft's Visual Studio 2010; in order to build native modules you must use the exact version. You can just download the Express Edition to build them, the entire IDE is not necessary. You can fetch the VS2010 ISO from here, and install the C++ component, then try again.
Note for future: If you plan to upgrade Python to 3.5 (release date is September 13, 2015), the Visual Studio version will be 2015, so you can be ready if you have the save problem
I try to install flask-bcrypt via pip, but it raisis me this error:
error: Microsoft Visual C++ 10.0 is required (Unable to find vcvarsall.bat)
I am currently running Visual Studio 2015 RC with Python 3 on Windows 10.
Any ideas how to solve this error?
Edit:
I tried to follow diffrent solutions and installed Visual Studio 2010 Express and am now stuck with teh following error (Installing via PIP in VS 2013):
Collecting py-bcrypt
Using cached py-bcrypt-0.4.tar.gz
Installing collected packages: py-bcrypt
Running setup.py install for py-bcrypt
Complete output from command "C:\Users\Niels\Documents\Visual Studio 2013\Projects\biospark\biospark\env_biospark\Scripts\python.exe" -c "import setuptools, tokenize;__file__='C:\\Users\\Niels\\AppData\\Local\\Temp\\pip-build-3pqnujd2\\py-bcrypt\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record C:\Users\Niels\AppData\Local\Temp\pip-syaty7au-record\install-record.txt --single-version-externally-managed --compile --install-headers "C:\Users\Niels\Documents\Visual Studio 2013\Projects\biospark\biospark\env_biospark\include\site\python3.4\py-bcrypt":
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.4
creating build\lib.win-amd64-3.4\bcrypt
copying bcrypt\__init__.py -> build\lib.win-amd64-3.4\bcrypt
running build_ext
building 'bcrypt._bcrypt' extension
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Niels\AppData\Local\Temp\pip-build-3pqnujd2\py-bcrypt\setup.py", line 61, in <module>
ext_modules = [bcrypt]
File "C:\Users\Niels\Anaconda3\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Users\Niels\Anaconda3\lib\distutils\dist.py", line 955, in run_commands
self.run_command(cmd)
File "C:\Users\Niels\Anaconda3\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Users\Niels\Documents\Visual Studio 2013\Projects\biospark\biospark\env_biospark\lib\site-packages\setuptools-15.1-py3.4.egg\setuptools\command\install.py", line 61, in run
File "C:\Users\Niels\Anaconda3\lib\distutils\command\install.py", line 539, in run
self.run_command('build')
File "C:\Users\Niels\Anaconda3\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Users\Niels\Anaconda3\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Users\Niels\Anaconda3\lib\distutils\command\build.py", line 126, in run
self.run_command(cmd_name)
File "C:\Users\Niels\Anaconda3\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Users\Niels\Anaconda3\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Users\Niels\Documents\Visual Studio 2013\Projects\biospark\biospark\env_biospark\lib\site-packages\setuptools-15.1-py3.4.egg\setuptools\command\build_ext.py", line 50, in run
File "C:\Users\Niels\Anaconda3\lib\distutils\command\build_ext.py", line 339, in run
self.build_extensions()
File "C:\Users\Niels\Anaconda3\lib\distutils\command\build_ext.py", line 448, in build_extensions
self.build_extension(ext)
File "C:\Users\Niels\Documents\Visual Studio 2013\Projects\biospark\biospark\env_biospark\lib\site-packages\setuptools-15.1-py3.4.egg\setuptools\command\build_ext.py", line 183, in build_extension
File "C:\Users\Niels\Anaconda3\lib\distutils\command\build_ext.py", line 503, in build_extension
depends=ext.depends)
File "C:\Users\Niels\Anaconda3\lib\distutils\msvc9compiler.py", line 460, in compile
self.initialize()
File "C:\Users\Niels\Anaconda3\lib\distutils\msvc9compiler.py", line 371, in initialize
vc_env = query_vcvarsall(VERSION, plat_spec)
File "C:\Users\Niels\Documents\Visual Studio 2013\Projects\biospark\biospark\env_biospark\lib\site-packages\setuptools-15.1-py3.4.egg\setuptools\msvc9_support.py", line 52, in query_vcvarsall
File "C:\Users\Niels\Anaconda3\lib\distutils\msvc9compiler.py", line 287, in query_vcvarsall
raise ValueError(str(list(result.keys())))
ValueError: ['path']
----------------------------------------
Command ""C:\Users\Niels\Documents\Visual Studio 2013\Projects\biospark\biospark\env_biospark\Scripts\python.exe" -c "import setuptools, tokenize;__file__='C:\\Users\\Niels\\AppData\\Local\\Temp\\pip-build-3pqnujd2\\py-bcrypt\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record C:\Users\Niels\AppData\Local\Temp\pip-syaty7au-record\install-record.txt --single-version-externally-managed --compile --install-headers "C:\Users\Niels\Documents\Visual Studio 2013\Projects\biospark\biospark\env_biospark\include\site\python3.4\py-bcrypt"" failed with error code 1 in C:\Users\Niels\AppData\Local\Temp\pip-build-3pqnujd2\py-bcrypt
'py-bcrypt' failed to install. Exit code: 1
Edit 2: I installed pycrypto via thsi Windows Installer: https://github.com/axper/python3-pycrypto-windows-installer which comes with bcrypt and suits my needs. But it would be nice to solve the original Problem.
Apparently the problem can be solved by installing py-bcrypt first. A win32 installer is available from the first comment to this reddit post:
http://www.reddit.com/r/flask/comments/15q5xj/anyone_have_a_working_version_of_flaskbcrypt_for/
Here is another option, you need to setup Wheel package before you can import bcrypt
pip install wheel
pip install bcrypt
from flask_bcrypt import Bcrypt