PyPi包vmprof无法安装在64位Windows 7计算机上

时间:2016-07-23 14:07:55

标签: pip

我很欣赏诊断方面的一些帮助。

错误消息指出无法在64位计算机上安装此程序包或者选择了错误的编译器。

修改 vmprof pip install vmprof表示它只能在x86(32位)上运行。很明显,C编译器应该被指示将源编译为32位。这是否意味着vmprof包装的缺陷应该作为一个vmprof问题提出?
结束编辑。

无论哪种方式,我都不知道如何解决这个问题。我从命令行运行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

警告C4311:requirements

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

这两个警告让我想知道PyPi是否无法将vmprof安装到我的64位环境中。但是,如果按时间排序显示的错误输出,则在生成这些警告后,似乎已加载Visual Studio。这可能指向使用错误的编译器吗?从2005年开始,我有大量的Microsoft Visual C ++ YYYY Redistributable 32位和64位。 (我不愿意通过卸载旧版本来测试错误的编译器理论,以防万一。)

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

This warning detects an attempt to assign a 32-bit value to a 64-bit pointer type与警告有关," manifest_maker:标准文件' -c'找不到" 我的setuptools是完全最新的。 (第25.0.0节)。 vmprof不能作为建议链接的预建二进制文件。无论如何,那里的所有二进制文件都不受支持。 关于此警告的其他SO问题与Unix有关。

警告LNK4197:other SO questions 这就是构建最终似乎脱轨的关键所在。我猜测" export' PyInit__vmprof'"''''在作为vmprof的一部分提供的命令文件中。

错误LNK2001:export 'PyInit__vmprof' specified multiple times; using first specification.

此处它因链接错误而崩溃。完整的pip安装输出如下。

{{1}}

2 个答案:

答案 0 :(得分:2)

这是vmprof's github repository上的一个问题,在2016年8月23日没有修复。

答案 1 :(得分:0)

最后,来自v0.4的vmprof正式支持64位Windows

查看已关闭的GitHub Issue