Python pip 安装报告实验室错误

Python pip install reportlab error

我正在尝试为 python 安装 reportlab。我有 Windows 7、Python 2.7 和 Visual Studio 2013,我正在使用命令行 "pip install reportlab" 但它不起作用。

我有生成的 pip 日志文件数据 - 将此文件附加到我的问题以便其他人可以查看的最佳方法是什么?

这是日志 file/command 行的最后一部分:

C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\BIN\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DLIBART_COMPILATION -DLIBART_VERSION=\"2.3.12\" -Ic:\users\kvincent\appdata\local\temp\pip-build-kvincent\reportlab\src\rl_addons\renderPM -Ic:\users\kvincent\appdata\local\temp\pip-build-kvincent\reportlab\src\rl_addons\renderPM\libart_lgpl -Ic:\users\kvincent\appdata\local\temp\pip-build-kvincent\reportlab\src\rl_addons\renderPM\gt1 -IC:\Python27\include -IC:\Python27\PC /Tcc:\users\kvincent\appdata\local\temp\pip-build-kvincent\reportlab\src\rl_addons\renderPM\libart_lgpl\art_rgb_rgba_affine.c /Fobuild\temp.win-amd64-2.7\Release\users\kvincent\appdata\local\temp\pip-build-kvincent\reportlab\src\rl_addons\renderPM\libart_lgpl\art_rgb_rgba_affine.obj

art_rgb_rgba_affine.c

C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\BIN\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DLIBART_COMPILATION -DLIBART_VERSION=\"2.3.12\" -Ic:\users\kvincent\appdata\local\temp\pip-build-kvincent\reportlab\src\rl_addons\renderPM -Ic:\users\kvincent\appdata\local\temp\pip-build-kvincent\reportlab\src\rl_addons\renderPM\libart_lgpl -Ic:\users\kvincent\appdata\local\temp\pip-build-kvincent\reportlab\src\rl_addons\renderPM\gt1 -IC:\Python27\include -IC:\Python27\PC /Tcc:\users\kvincent\appdata\local\temp\pip-build-kvincent\reportlab\src\rl_addons\renderPM\libart_lgpl\art_svp_intersect.c /Fobuild\temp.win-amd64-2.7\Release\users\kvincent\appdata\local\temp\pip-build-kvincent\reportlab\src\rl_addons\renderPM\libart_lgpl\art_svp_intersect.obj

art_svp_intersect.c

C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\BIN\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DLIBART_COMPILATION -DLIBART_VERSION=\"2.3.12\" -Ic:\users\kvincent\appdata\local\temp\pip-build-kvincent\reportlab\src\rl_addons\renderPM -Ic:\users\kvincent\appdata\local\temp\pip-build-kvincent\reportlab\src\rl_addons\renderPM\libart_lgpl -Ic:\users\kvincent\appdata\local\temp\pip-build-kvincent\reportlab\src\rl_addons\renderPM\gt1 -IC:\Python27\include -IC:\Python27\PC /Tcc:\users\kvincent\appdata\local\temp\pip-build-kvincent\reportlab\src\rl_addons\renderPM\libart_lgpl\art_svp_render_aa.c /Fobuild\temp.win-amd64-2.7\Release\users\kvincent\appdata\local\temp\pip-build-kvincent\reportlab\src\rl_addons\renderPM\libart_lgpl\art_svp_render_aa.obj

art_svp_render_aa.c

C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\BIN\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DLIBART_COMPILATION -DLIBART_VERSION=\"2.3.12\" -Ic:\users\kvincent\appdata\local\temp\pip-build-kvincent\reportlab\src\rl_addons\renderPM -Ic:\users\kvincent\appdata\local\temp\pip-build-kvincent\reportlab\src\rl_addons\renderPM\libart_lgpl -Ic:\users\kvincent\appdata\local\temp\pip-build-kvincent\reportlab\src\rl_addons\renderPM\gt1 -IC:\Python27\include -IC:\Python27\PC /Tcc:\users\kvincent\appdata\local\temp\pip-build-kvincent\reportlab\src\rl_addons\renderPM\libart_lgpl\art_misc.c /Fobuild\temp.win-amd64-2.7\Release\users\kvincent\appdata\local\temp\pip-build-kvincent\reportlab\src\rl_addons\renderPM\libart_lgpl\art_misc.obj

art_misc.c

C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\BIN\amd64\link.exe /DLL /nologo /INCREMENTAL:NO /LIBPATH:C:\Python27\libs /LIBPATH:C:\Python27\PCbuild\amd64 /EXPORT:init_renderPM build\temp.win-amd64-2.7\Release\users\kvincent\appdata\local\temp\pip-build-kvincent\reportlab\src\rl_addons\renderPM\_renderPM.obj build\temp.win-amd64-2.7\Release\users\kvincent\appdata\local\temp\pip-build-kvincent\reportlab\src\rl_addons\renderPM\gt1\gt1-parset1.obj build\temp.win-amd64-2.7\Release\users\kvincent\appdata\local\temp\pip-build-kvincent\reportlab\src\rl_addons\renderPM\gt1\gt1-dict.obj build\temp.win-amd64-2.7\Release\users\kvincent\appdata\local\temp\pip-build-kvincent\reportlab\src\rl_addons\renderPM\gt1\gt1-namecontext.obj build\temp.win-amd64-2.7\Release\users\kvincent\appdata\local\temp\pip-build-kvincent\reportlab\src\rl_addons\renderPM\gt1\gt1-region.obj build\temp.win-amd64-2.7\Release\users\kvincent\appdata\local\temp\pip-build-kvincent\reportlab\src\rl_addons\renderPM\libart_lgpl\art_vpath_bpath.obj build\temp.win-amd64-2.7\Release\users\kvincent\appdata\local\temp\pip-build-kvincent\reportlab\src\rl_addons\renderPM\libart_lgpl\art_rgb_pixbuf_affine.obj build\temp.win-amd64-2.7\Release\users\kvincent\appdata\local\temp\pip-build-kvincent\reportlab\src\rl_addons\renderPM\libart_lgpl\art_rgb_svp.obj build\temp.win-amd64-2.7\Release\users\kvincent\appdata\local\temp\pip-build-kvincent\reportlab\src\rl_addons\renderPM\libart_lgpl\art_svp.obj build\temp.win-amd64-2.7\Release\users\kvincent\appdata\local\temp\pip-build-kvincent\reportlab\src\rl_addons\renderPM\libart_lgpl\art_svp_vpath.obj build\temp.win-amd64-2.7\Release\users\kvincent\appdata\local\temp\pip-build-kvincent\reportlab\src\rl_addons\renderPM\libart_lgpl\art_svp_vpath_stroke.obj build\temp.win-amd64-2.7\Release\users\kvincent\appdata\local\temp\pip-build-kvincent\reportlab\src\rl_addons\renderPM\libart_lgpl\art_svp_ops.obj build\temp.win-amd64-2.7\Release\users\kvincent\appdata\local\temp\pip-build-kvincent\reportlab\src\rl_addons\renderPM\libart_lgpl\art_vpath.obj build\temp.win-amd64-2.7\Release\users\kvincent\appdata\local\temp\pip-build-kvincent\reportlab\src\rl_addons\renderPM\libart_lgpl\art_vpath_dash.obj build\temp.win-amd64-2.7\Release\users\kvincent\appdata\local\temp\pip-build-kvincent\reportlab\src\rl_addons\renderPM\libart_lgpl\art_affine.obj build\temp.win-amd64-2.7\Release\users\kvincent\appdata\local\temp\pip-build-kvincent\reportlab\src\rl_addons\renderPM\libart_lgpl\art_rect.obj build\temp.win-amd64-2.7\Release\users\kvincent\appdata\local\temp\pip-build-kvincent\reportlab\src\rl_addons\renderPM\libart_lgpl\art_rgb_affine.obj build\temp.win-amd64-2.7\Release\users\kvincent\appdata\local\temp\pip-build-kvincent\reportlab\src\rl_addons\renderPM\libart_lgpl\art_rgb_affine_private.obj build\temp.win-amd64-2.7\Release\users\kvincent\appdata\local\temp\pip-build-kvincent\reportlab\src\rl_addons\renderPM\libart_lgpl\art_rgb.obj build\temp.win-amd64-2.7\Release\users\kvincent\appdata\local\temp\pip-build-kvincent\reportlab\src\rl_addons\renderPM\libart_lgpl\art_rgb_rgba_affine.obj build\temp.win-amd64-2.7\Release\users\kvincent\appdata\local\temp\pip-build-kvincent\reportlab\src\rl_addons\renderPM\libart_lgpl\art_svp_intersect.obj build\temp.win-amd64-2.7\Release\users\kvincent\appdata\local\temp\pip-build-kvincent\reportlab\src\rl_addons\renderPM\libart_lgpl\art_svp_render_aa.obj build\temp.win-amd64-2.7\Release\users\kvincent\appdata\local\temp\pip-build-kvincent\reportlab\src\rl_addons\renderPM\libart_lgpl\art_misc.obj /OUT:build\lib.win-amd64-2.7\reportlab\graphics\_renderPM.pyd /IMPLIB:build\temp.win-amd64-2.7\Release\users\kvincent\appdata\local\temp\pip-build-kvincent\reportlab\src\rl_addons\renderPM\_renderPM.lib /MANIFESTFILE:build\temp.win-amd64-2.7\Release\users\kvincent\appdata\local\temp\pip-build-kvincent\reportlab\src\rl_addons\renderPM\_renderPM.pyd.manifest

   Creating library build\temp.win-amd64-2.7\Release\users\kvincent\appdata\local\temp\pip-build-kvincent\reportlab\src\rl_addons\renderPM\_renderPM.lib and object build\temp.win-amd64-2.7\Release\users\kvincent\appdata\local\temp\pip-build-kvincent\reportlab\src\rl_addons\renderPM\_renderPM.exp

C:\Program Files (x86)\Windows Kits.1\bin\x64\mt.exe -nologo -manifest build\temp.win-amd64-2.7\Release\users\kvincent\appdata\local\temp\pip-build-kvincent\reportlab\src\rl_addons\renderPM\_renderPM.pyd.manifest -outputresource:build\lib.win-amd64-2.7\reportlab\graphics\_renderPM.pyd;2



build\temp.win-amd64-2.7\Release\users\kvincent\appdata\local\temp\pip-build-kvincent\reportlab\src\rl_addons\renderPM\_renderPM.pyd.manifest : general error c1010070: Failed to load and parse the manifest. The system cannot find the file specified.

error: command 'mt.exe' failed with exit status 31

----------------------------------------

Command C:\Python27\python.exe -c "import setuptools;__file__='c:\users\kvincent\appdata\local\temp\pip-build-kvincent\reportlab\setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\kvincent\appdata\local\temp\pip-zbzt97-record\install-record.txt --single-version-externally-managed failed with error code 1 in c:\users\kvincent\appdata\local\temp\pip-build-kvincent\reportlab

Exception information:
Traceback (most recent call last):
  File "C:\Python27\lib\site-packages\pip\basecommand.py", line 139, in main
    status = self.run(options, args)
  File "C:\Python27\lib\site-packages\pip\commands\install.py", line 271, in run
    requirement_set.install(install_options, global_options, root=options.root_path)
  File "C:\Python27\lib\site-packages\pip\req.py", line 1185, in install
    requirement.install(install_options, global_options, *args, **kwargs)
  File "C:\Python27\lib\site-packages\pip\req.py", line 592, in install
    cwd=self.source_dir, filter_stdout=self._filter_install, show_stdout=False)
  File "C:\Python27\lib\site-packages\pip\util.py", line 662, in call_subprocess
    % (command_desc, proc.returncode, cwd))
InstallationError: Command C:\Python27\python.exe -c "import setuptools;__file__='c:\users\kvincent\appdata\local\temp\pip-build-kvincent\reportlab\setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\kvincent\appdata\local\temp\pip-zbzt97-record\install-record.txt --single-version-externally-managed failed with error code 1 in c:\users\kvincent\appdata\local\temp\pip-build-kvincent\reportlab

您不是丢失文件,只是无法找到它。

按以下顺序尝试这些代码:

python setup.py build --compiler=mingw32

然后:

python setup.py install

在此处获取预编译的二进制文件: http://www.lfd.uci.edu/~gohlke/pythonlibs/#reportlab

在 Windows 上安装未编译的 Python 库很痛苦:不要让自己经历它。简单点:买一些已经为你准备好的东西。

我发现在 python 2.7

中安装 reportlab 有问题

我建议您使用 python 3.6 升级,您可以使用 pip 命令安装 reportlab

'pip install reportlab'