PIP安装Statsmodels失败,退出代码为1120

时间:2019-07-01 21:02:49

标签: c++ pip statsmodels

我整天都在尝试下载statsmodels软件包,但是没有运气。我已经下载了最新的C ++构建工具,并相信一切都已正确下载。当我尝试点安装statsmodels时,下面返回了以下错误消息。我还尝试运行 pip install statsmodels == 0.6.0 ,该退出状态为 2 。除了卸载python和c ++构建工具然后重新下载之外,我不太确定我能做什么。任何意见,将不胜感激。谢谢。

set build\lib.win32-3.7\statsmodels/_version.py to '0.10.0'
running build_ext
   Creating library build\temp.win32-3.7\Release\statsmodels/tsa/innovations\_arma_innovations.cp37-win32.lib and object build\temp.win32-3.7\Release\statsmodels/tsa/innovations\_arma_innovations.cp37-win32.exp
LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library
MSVCRT.lib(chandler4gs.obj) : error LNK2001: unresolved external symbol __except_handler4_common
build\lib.win32-3.7\statsmodels\tsa\innovations\_arma_innovations.cp37-win32.pyd : fatal error LNK1120: 1 unresolved externals
error: Command "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.21.27702\bin\HostX86\x86\link.exe /nologo /INCREMENTAL:NO /LTCG /nodefaultlib:libucrt.lib ucrt.lib /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:c:\\users\\dp1069\\appdata\\local\\programs\\python\\python37-32\\lib\\site-packages\\numpy\\core\\lib /LIBPATH:c:\users\dp1069\appdata\local\programs\python\python37-32\libs /LIBPATH:c:\users\dp1069\appdata\local\programs\python\python37-32\PCbuild\win32 /LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.21.27702\ATLMFC\lib\x86 /LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.21.27702\lib\x86 /LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.17763.0\ucrt\x86 /LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.17763.0\um\x86 /LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.21.27702\ATLMFC\lib\x64 /LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.21.27702\lib\x64 /LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.17763.0\ucrt\x64 /LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.17763.0\um\x64 npymath.lib /EXPORT:PyInit__arma_innovations build\temp.win32-3.7\Release\statsmodels/tsa/innovations/_arma_innovations.obj /OUT:build\lib.win32-3.7\statsmodels\tsa\innovations\_arma_innovations.cp37-win32.pyd /IMPLIB:build\temp.win32-3.7\Release\statsmodels/tsa/innovations\_arma_innovations.cp37-win32.lib" failed with exit status 1120

Command "c:\users\dp1069\appdata\local\programs\python\python37-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\dp1069\\AppData\\Local\\Temp\\pip-install-qd4q52qu\\statsmodels\\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\dp1069\AppData\Local\Temp\pip-record-dhpbb7se\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\dp1069\AppData\Local\Temp\pip-install-qd4q52qu\statsmodels\
You are using pip version 18.1, however version 19.1.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build>

1 个答案:

答案 0 :(得分:0)

对于所有可能遇到此问题并已安装所有依赖包的组件,解决方案非常简单。导航至https://www.lfd.uci.edu/~gohlke/pythonlibs/,找到您的软件包并按照说明通过python wheel下载该软件包。