所以我最近在D驱动器中安装了Visual Studio 2017,因为我在C中没有足够的空间。 现在,我正在尝试为项目安装Dlib。运行安装命令时
D:\Downloads\dlib-19.16.0\dlib-19.16.0>python setup.py install
我得到以下输出
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'
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.0 (default, Jun 28 2018, 08:04:48) [MSC v.1912 64 bit (AMD64)]
Invoking CMake setup: 'cmake D:\Downloads\dlib-19.16.0\dlib-19.16.0\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=D:\Downloads\dlib-19.16.0\dlib-19.16.0\build\lib.win-amd64-3.7 -DPYTHON_EXECUTABLE=D:\Program Files\Anaconda\python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=D:\Downloads\dlib-19.16.0\dlib-19.16.0\build\lib.win-amd64-3.7 -A x64'
CMake Error in CMakeLists.txt:
Generator
Visual Studio 15 2017
could not find specified instance of Visual Studio:
C:/Program Files (x86)/Microsoft Visual Studio/2017/Community
-- Configuring incomplete, errors occurred!
See also "D:/Downloads/dlib-19.16.0/dlib-19.16.0/build/temp.win-amd64-3.7/Release/CMakeFiles/CMakeOutput.log".
See also "D:/Downloads/dlib-19.16.0/dlib-19.16.0/build/temp.win-amd64-3.7/Release/CMakeFiles/CMakeError.log".
Traceback (most recent call last):
File "setup.py", line 257, in <module>
'Topic :: Software Development',
File "D:\Program Files\Anaconda\lib\site-packages\setuptools\__init__.py", line 140, in setup
return distutils.core.setup(**attrs)
File "D:\Program Files\Anaconda\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "D:\Program Files\Anaconda\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "D:\Program Files\Anaconda\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "D:\Program Files\Anaconda\lib\site-packages\setuptools\command\install.py", line 67, in run
self.do_egg_install()
File "D:\Program Files\Anaconda\lib\site-packages\setuptools\command\install.py", line 109, in do_egg_install
self.run_command('bdist_egg')
File "D:\Program Files\Anaconda\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "D:\Program Files\Anaconda\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "D:\Program Files\Anaconda\lib\site-packages\setuptools\command\bdist_egg.py", line 172, in run
cmd = self.call_command('install_lib', warn_dir=0)
File "D:\Program Files\Anaconda\lib\site-packages\setuptools\command\bdist_egg.py", line 158, in call_command
self.run_command(cmdname)
File "D:\Program Files\Anaconda\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "D:\Program Files\Anaconda\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "D:\Program Files\Anaconda\lib\site-packages\setuptools\command\install_lib.py", line 11, in run
self.build()
File "D:\Program Files\Anaconda\lib\distutils\command\install_lib.py", line 107, in build
self.run_command('build_ext')
File "D:\Program Files\Anaconda\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "D:\Program Files\Anaconda\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "setup.py", line 133, in run
self.build_extension(ext)
File "setup.py", line 170, in build_extension
subprocess.check_call(cmake_setup, cwd=build_folder)
File "D:\Program Files\Anaconda\lib\subprocess.py", line 328, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'D:\\Downloads\\dlib-19.16.0\\dlib-19.16.0\\tools\\python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=D:\\Downloads\\dlib-19.16.0\\dlib-19.16.0\\build\\lib.win-amd64-3.7', '-DPYTHON_EXECUTABLE=D:\\Program Files\\Anaconda\\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=D:\\Downloads\\dlib-19.16.0\\dlib-19.16.0\\build\\lib.win-amd64-3.7', '-A', 'x64']' returned non-zero exit status 1.
现在我面临的最大问题是,我已经在D盘中安装了Visual Studio。但是cmake不承认这一点,它始终在C驱动器中搜索。请帮忙。