退出状态失败1181

时间:2016-08-23 15:50:41

标签: python scikit-learn install anaconda

当我尝试在Python(v3.5.1)中安装samplerate时,出现错误:"失败,退出状态为1181"。 但是,此错误并不能确切地说明缺失的内容。 所以,我不知道该怎么做。 任何人都可以解释错误吗?或者,我怎么知道细节?

C:\Users\ianhacker\scikits.samplerate-0.3.3>python setup.py install
SamplerateInfo:
C:\Users\ianhacker\Anaconda3\lib\site-packages\numpy\distutils\system_info.py:635: UserWarning: Specified path  is invalid.
      warnings.warn('Specified path %s is invalid.' % d)
      FOUND:
        library_dirs = ['C:\\libsamplerate-0.1.8\\lib']
        include_dirs = ['C:\\libsamplerate-0.1.8\\include']
        libraries = ['samplerate']

running install
running bdist_egg
running egg_info
running build_src
build_src
building extension "scikits.samplerate._samplerate" sources
building data_files sources
build_src: building npy-pkg config files
writing dependency_links to scikits.samplerate.egg-info\dependency_links.txt
writing scikits.samplerate.egg-info\PKG-INFO
writing namespace_packages to scikits.samplerate.egg-info\namespace_packages.txt
writing requirements to scikits.samplerate.egg-info\requires.txt
writing top-level names to scikits.samplerate.egg-info\top_level.txt
reading manifest file 'scikits.samplerate.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'scikits.samplerate.egg-info\SOURCES.txt'
installing library code to build\bdist.win-amd64\egg
running install_lib
running build_py
creating build
creating build\lib.win-amd64-3.5
creating build\lib.win-amd64-3.5\scikits
copying .\scikits\__init__.py -> build\lib.win-amd64-3.5\scikits
creating build\lib.win-amd64-3.5\scikits\samplerate
copying scikits\samplerate\info.py -> build\lib.win-amd64-3.5\scikits\samplerate
copying scikits\samplerate\setup.py -> build\lib.win-amd64-3.5\scikits\samplerate
copying scikits\samplerate\setuphelp.py -> build\lib.win-amd64-3.5\scikits\samplerate
copying scikits\samplerate\version.py -> build\lib.win-amd64-3.5\scikits\samplerate
copying scikits\samplerate\__init__.py -> build\lib.win-amd64-3.5\scikits\samplerate
running build_ext
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
customize MSVCCompiler using build_ext
building 'scikits.samplerate._samplerate' extension
compiling C sources
creating build\temp.win-amd64-3.5
creating build\temp.win-amd64-3.5\Release
creating build\temp.win-amd64-3.5\Release\scikits
creating build\temp.win-amd64-3.5\Release\scikits\samplerate
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\libsamplerate-0.1.8\include -IC:\Users\ianhacker\Anaconda3\lib\site-packages\numpy\core\include -IC:\Users\ianhacker\Anaconda3\include -IC:\Users\ianhacker\Anaconda3\include -I"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" -I"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\ucrt" -I"C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\shared" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\um" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\winrt" /Tcscikits\samplerate\_samplerate.c /Fobuild\temp.win-amd64-3.5\Release\scikits\samplerate\_samplerate.obj
Found executable C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64\cl.exe
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:C:\libsamplerate-0.1.8\lib /LIBPATH:C:\Users\ianhacker\Anaconda3\libs /LIBPATH:C:\Users\ianhacker\Anaconda3\PCbuild\amd64 /LIBPATH:"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\LIB\amd64" /LIBPATH:"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\LIB\amd64" /LIBPATH:"C:\Program Files (x86)\Windows Kits\10\lib\10.0.14393.0\ucrt\x64" /LIBPATH:"C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\lib\um\x64" /LIBPATH:"C:\Program Files (x86)\Windows Kits\10\lib\10.0.14393.0\um\x64" samplerate.lib /EXPORT:PyInit__samplerate build\temp.win-amd64-3.5\Release\scikits\samplerate\_samplerate.obj /OUT:build\lib.win-amd64-3.5\scikits\samplerate\_samplerate.cp35-win_amd64.pyd /IMPLIB:build\temp.win-amd64-3.5\Release\scikits\samplerate\_samplerate.cp35-win_amd64.lib
Found executable C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64\link.exe
error: Command "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:C:\libsamplerate-0.1.8\lib /LIBPATH:C:\Users\ianhacker\Anaconda3\libs /LIBPATH:C:\Users\ianhacker\Anaconda3\PCbuild\amd64 /LIBPATH:"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\LIB\amd64" /LIBPATH:"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\LIB\amd64" /LIBPATH:"C:\Program Files (x86)\Windows Kits\10\lib\10.0.14393.0\ucrt\x64" /LIBPATH:"C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\lib\um\x64" /LIBPATH:"C:\Program Files (x86)\Windows Kits\10\lib\10.0.14393.0\um\x64" samplerate.lib /EXPORT:PyInit__samplerate build\temp.win-amd64-3.5\Release\scikits\samplerate\_samplerate.obj /OUT:build\lib.win-amd64-3.5\scikits\samplerate\_samplerate.cp35-win_amd64.pyd /IMPLIB:build\temp.win-amd64-3.5\Release\scikits\samplerate\_samplerate.cp35-win_amd64.lib" failed with exit status 1181

让我从这里编辑

site.cfg(解析此文件以查找lib和include目录):

[samplerate]
library_dirs=C:\libsamplerate-0.1.8\lib
include_dirs=C:\libsamplerate-0.1.8\include

摘录自 C:\ Users \用户ianhacker \ Anaconda3 \ lib中\站点包\ numpy的\的distutils \ system_info.py:

def get_paths(self, section, key):
    dirs = self.cp.get(section, key).split(os.pathsep)
    env_var = self.dir_env_var
    if env_var:
        if is_sequence(env_var):
            e0 = env_var[-1]
            for e in env_var:
                if e in os.environ:
                    e0 = e
                    break
            if not env_var[0] == e0:
                log.info('Setting %s=%s' % (env_var[0], e0))
            env_var = e0
    if env_var and env_var in os.environ:
        d = os.environ[env_var]
        if d == 'None':
            log.info('Disabled %s: %s',
                     self.__class__.__name__, '(%s is None)'
                     % (env_var,))
            return []
        if os.path.isfile(d):
            dirs = [os.path.dirname(d)] + dirs
            l = getattr(self, '_lib_names', [])
            if len(l) == 1:
                b = os.path.basename(d)
                b = os.path.splitext(b)[0]
                if b[:3] == 'lib':
                    log.info('Replacing _lib_names[0]==%r with %r' \
                          % (self._lib_names[0], b[3:]))
                    self._lib_names[0] = b[3:]
        else:
            ds = d.split(os.pathsep)
            ds2 = []
            for d in ds:
                if os.path.isdir(d):
                    ds2.append(d)
                    for dd in ['include', 'lib']:
                        d1 = os.path.join(d, dd)
                        if os.path.isdir(d1):
                            ds2.append(d1)
            dirs = ds2 + dirs
    default_dirs = self.cp.get(self.section, key).split(os.pathsep)
    dirs.extend(default_dirs)
    ret = []
    for d in dirs:
        if not os.path.isdir(d):
            warnings.warn('Specified path %s is invalid.' % d) # Line 635
            continue

        if d not in ret:
            ret.append(d)

    log.debug('( %s = %s )', key, ':'.join(ret))
    return ret

def get_lib_dirs(self, key='library_dirs'):
    return self.get_paths(self.section, key)

def get_runtime_lib_dirs(self, key='runtime_library_dirs'):
    return self.get_paths(self.section, key)

def get_include_dirs(self, key='include_dirs'):
    return self.get_paths(self.section, key)

def get_src_dirs(self, key='src_dirs'):
    return self.get_paths(self.section, key)

......所以,如果' d'不是目录,'指定的路径%s无效。'被展示。而%s(即' d')的值是一个空格(或空)... 我不明白发生了什么。

但是,等等。这只是一个警告,对吗? 也许我们可以忽略这一点。 相反,我们应该关注错误1181。

我希望我有这样的信息:

  

致命错误LNK1181:无法打开输入文件' C:\ Program.obj'

......但是,实际上只说

  

以退出状态1181失败

并且没有指定缺少哪个文件。

0 个答案:

没有答案