2016-07-23 141 views
0

我希望得到诊断方面的帮助。PyPi软件包vmprof无法在64位Windows 7机器上安装

错误消息指出可能无法在64位机器上安装此软件包,或者选择了错误的编译器。

编辑:requirementsvmprof状态,它将仅在x86(32位)上运行。很明显,应该指示C编译器将源代码编译为32位。这是否意味着vmprof包装中的缺陷应该作为vmprof问题提出来?
结束编辑。

无论哪种方式,我不知道如何解决这个问题。我从命令行运行pip install vmprof

警告C4311:This warning detects 64-bit pointer truncation issues.

警告C4312:This warning detects an attempt to assign a 32-bit value to a 64-bit pointer type

这两个警告使我怀疑,如果PyPI将不能vmprof安装到我的64位环境。但是,如果所呈现的错误输出按时间排序,那么在生成这些警告后,Visual Studio就会加载。这是否指向正在使用的错误编译器?从2005年起,我确实有一大组Microsoft Visual C++ YYYY可再发行组件用于32位和64位。 (我不愿意通过卸载旧版本来测试错误的编译器理论,以防破坏某些东西)。

PyPi说它试图加载Microsoft Visual Studio v14.0,我相信它是Python 3.5的正确版本。

other SO questions有关的警告,“manifest_maker:标准文件'-c'未找到” 我的setuptools是完全最新的。 (v 25.0.0)。 vmprof不可用作建议链接的预建二进制文件。无论如何,所有的二进制文件都不受支持。 有关此警告的其他SO问题与Unix有关。

警告LNK4197:export 'PyInit__vmprof' specified multiple times; using first specification. 这是构建最终似乎脱离轨道的点。我猜测“导出”PyInit__vmprof'“的多个规范在作为vmprof的一部分提供的命令文件中。

错误LNK2001:unresolved external symbol _PyThreadState_Current build\lib.win-amd64-3.5_vmprof.cp35-win_amd64.pyd : fatal error LNK1120: 1 unresolved externals.

在这里坠毁的链接错误。完整的pip安装输出如下。

Installing collected packages: requests, vmprof 

    Running setup.py install for vmprof error 

    Complete output from command d:\python35\python.exe -u -c "import setuptools, tokenize;__file__='D:\\Users\\Stephen\ 

\AppData\\Local\\Temp\\pip-build-dpjo8j82\\vmprof\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read 

().replace('\r\n', '\n'), __file__, 'exec'))" install --record D:\Users\Stephen\AppData\Local\Temp\pip-kfygn2le-record\i 

nstall-record.txt --single-version-externally-managed --compile: 

    running install 

    running build 

    running build_py 

    creating build 

    creating build\lib.win-amd64-3.5 

    creating build\lib.win-amd64-3.5\tests 

    copying tests\cpuburn.py -> build\lib.win-amd64-3.5\tests 

    copying tests\test_config.py -> build\lib.win-amd64-3.5\tests 

    copying tests\test_reader.py -> build\lib.win-amd64-3.5\tests 

    copying tests\test_run.py -> build\lib.win-amd64-3.5\tests 

    copying tests\test_stats.py -> build\lib.win-amd64-3.5\tests 

    copying tests\__init__.py -> build\lib.win-amd64-3.5\tests 

    creating build\lib.win-amd64-3.5\vmprof 

    copying vmprof\binary.py -> build\lib.win-amd64-3.5\vmprof 

    copying vmprof\cli.py -> build\lib.win-amd64-3.5\vmprof 

    copying vmprof\profiler.py -> build\lib.win-amd64-3.5\vmprof 

    copying vmprof\reader.py -> build\lib.win-amd64-3.5\vmprof 

    copying vmprof\show.py -> build\lib.win-amd64-3.5\vmprof 

    copying vmprof\stats.py -> build\lib.win-amd64-3.5\vmprof 

    copying vmprof\upload.py -> build\lib.win-amd64-3.5\vmprof 

    copying vmprof\vmprofdemo.py -> build\lib.win-amd64-3.5\vmprof 

    copying vmprof\__init__.py -> build\lib.win-amd64-3.5\vmprof 

    copying vmprof\__main__.py -> build\lib.win-amd64-3.5\vmprof 

    creating build\lib.win-amd64-3.5\vmprof\log 

    copying vmprof\log\constants.py -> build\lib.win-amd64-3.5\vmprof\log 

    copying vmprof\log\marks.py -> build\lib.win-amd64-3.5\vmprof\log 

    copying vmprof\log\merge_point.py -> build\lib.win-amd64-3.5\vmprof\log 

    copying vmprof\log\objects.py -> build\lib.win-amd64-3.5\vmprof\log 

    copying vmprof\log\parser.py -> build\lib.win-amd64-3.5\vmprof\log 

    copying vmprof\log\__init__.py -> build\lib.win-amd64-3.5\vmprof\log 

    running egg_info 

    writing entry points to vmprof.egg-info\entry_points.txt 

    writing requirements to vmprof.egg-info\requires.txt 

    writing dependency_links to vmprof.egg-info\dependency_links.txt 

    writing top-level names to vmprof.egg-info\top_level.txt 

    writing vmprof.egg-info\PKG-INFO 

    warning: manifest_maker: standard file '-c' not found 



    reading manifest file 'vmprof.egg-info\SOURCES.txt' 

    reading manifest template 'MANIFEST.in' 

    writing manifest file 'vmprof.egg-info\SOURCES.txt' 

    running build_ext 

    building '_vmprof' extension 

    creating build\temp.win-amd64-3.5 

    creating build\temp.win-amd64-3.5\Release 

    creating build\temp.win-amd64-3.5\Release\src 

    D:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Id: 

\python35\include -Id:\python35\include "-ID:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-ID:\Program 

Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" "-ID:\Program Files (x86)\Windows Kits\8.1\include\shared" "-ID: 

\Program Files (x86)\Windows Kits\8.1\include\um" "-ID:\Program Files (x86)\Windows Kits\8.1\include\winrt" /Tcsrc/_vmpr 

of.c /Fobuild\temp.win-amd64-3.5\Release\src/_vmprof.obj 

    _vmprof.c 

    d:\users\stephen\appdata\local\temp\pip-build-dpjo8j82\vmprof\src\vmprof_common.h(67): warning C4311: 'type cast': p 

ointer truncation from 'PyCodeObject *' to 'unsigned long' 

    d:\users\stephen\appdata\local\temp\pip-build-dpjo8j82\vmprof\src\vmprof_common.h(67): warning C4312: 'type cast': c 

onversion from 'unsigned long' to 'void *' of greater size 

    d:\users\stephen\appdata\local\temp\pip-build-dpjo8j82\vmprof\src\vmprof_common.h(96): warning C4267: '=': conversio 

n from 'size_t' to 'char', possible loss of data 

    d:\users\stephen\appdata\local\temp\pip-build-dpjo8j82\vmprof\src\vmprof_main_win32.h(31): warning C4267: 'function' 

: conversion from 'size_t' to 'unsigned int', possible loss of data 

    d:\users\stephen\appdata\local\temp\pip-build-dpjo8j82\vmprof\src\vmprof_main_win32.h(48): warning C4267: 'initializ 

ing': conversion from 'size_t' to 'int', possible loss of data 

    d:\users\stephen\appdata\local\temp\pip-build-dpjo8j82\vmprof\src\vmprof_main_win32.h(72): warning C4312: 'type cast 

': conversion from 'DWORD' to 'void *' of greater size 

    src/_vmprof.c(42): warning C4311: 'type cast': pointer truncation from 'PyCodeObject *' to 'unsigned long' 

    src/_vmprof.c(42): warning C4312: 'type cast': conversion from 'unsigned long' to 'void *' of greater size 

    src/_vmprof.c(69): warning C4311: 'type cast': pointer truncation from 'PyCodeObject *' to 'unsigned long' 

    D:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MA 

NIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:d:\python35\libs /LIBPATH:d:\python35\PCbuild\amd64 "/LIBPATH:D:\Program File 

s (x86)\Microsoft Visual Studio 14.0\VC\LIB\amd64" "/LIBPATH:D:\Program Files (x86)\Windows Kits\10\lib\10.0.10240.0\ucr 

t\x64" "/LIBPATH:D:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x64" /EXPORT:PyInit__vmprof build\temp.win-amd64 

-3.5\Release\src/_vmprof.obj /OUT:build\lib.win-amd64-3.5\_vmprof.cp35-win_amd64.pyd /IMPLIB:build\temp.win-amd64-3.5\Re 

lease\src\_vmprof.cp35-win_amd64.lib 

    _vmprof.obj : warning LNK4197: pip specified multiple times; using first specification 

     Creating library build\temp.win-amd64-3.5\Release\src\_vmprof.cp35-win_amd64.lib and object build\temp.win-amd64- 

3.5\Release\src\_vmprof.cp35-win_amd64.exp 

    _vmprof.obj : error LNK2001: unresolved external symbol _PyThreadState_Current 

    build\lib.win-amd64-3.5\_vmprof.cp35-win_amd64.pyd : fatal error LNK1120: 1 unresolved externals 

    error: command 'D:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\link.exe' failed with exi 

t status 1120 

回答

2

这是vmprof's github repository上的问题,它在2016年8月23日未定。

+0

目前这个问题是固定的。而'conda install -c conda-forge vmprof'中的vmprof 0.4.9适用于我的Windows 10,python 3.6.4 x64。 – Igor

相关问题