为什么我不能安装line_profiler?

时间:2019-09-10 17:13:19

标签: python-3.x

我的计算机是win10,安装了VS2015,python 3.7.3。

当我使用jupyter笔记本时,我发现“%paste”无效,该错误表明“ UsageError:Line magic function %paste not found。”。 然后我发现未安装软件包“ line_profiler”。 所以我用“ pip install line_profiler”安装它 但是,会出现很多红线。

因为我有VS2015,所以无法安装可视cpp构建工具,这是我在网站上找到的答案。 所以我不知道该怎么办。 甚至我也很难理解错误信息。

ERROR: Complete output from command 'd:\python\python.exe' -u -c 'import setuptools, 
tokenize;__file__='"'"'C:\\Users\\AMARAN~1\\AppData\\Local\\Temp\\pip-    install-o1auvf_5\\line-profiler\\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\AMARAN~1\AppData\Local\Temp\pip-record-rymmwo49\install-record.txt' --single-version-externally-managed --compile:

ERROR: Could not import Cython. Using the available pre-generated C file.

running install

running build

running build_py

creating build

creating build\lib.win-amd64-3.7

copying line_profiler.py -> build\lib.win-amd64-3.7

copying kernprof.py -> build\lib.win-amd64-3.7

copying line_profiler_py35.py -> build\lib.win-amd64-3.7

running build_ext

building '_line_profiler' extension

creating build\temp.win-amd64-3.7

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

C:\Program Files (x86)\Microsoft Visual Studio 
14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -
Id:\python\include -Id:\python\include "-IC:\Program Files             (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\\shared" "-IC:\Program Files (x86)\Windows Kits\8.1\include\\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\\winrt" /Tc_line_profiler.c /Fobuild\temp.win-amd64-3.7\Release\_line_profiler.obj
_line_profiler.c
_line_profiler.c(7890): error C2039: “exc_type”: 不是“_ts”的成员
 _line_profiler.c(7890): error C2039: “exc_type”: 不是“_ts”的成员
d:\python\include\pystate.h(212): note: 参见“_ts”的声明
_line_profiler.c(7891): error C2039: “exc_value”: 不是“_ts”的成员
d:\python\include\pystate.h(212): note: 参见“_ts”的声明
_line_profiler.c(7892): error C2039: “exc_traceback”: 不是“_ts”的成员
d:\python\include\pystate.h(212): note: 参见“_ts”的声明
_line_profiler.c(7899): error C2039: “exc_type”: 不是“_ts”的成员
d:\python\include\pystate.h(212): note: 参见“_ts”的声明
_line_profiler.c(7900): error C2039: “exc_value”: 不是“_ts”的成员
d:\python\include\pystate.h(212): note: 参见“_ts”的声明
_line_profiler.c(7901): error C2039: “exc_traceback”: 不是“_ts”的成员
d:\python\include\pystate.h(212): note: 参见“_ts”的声明
_line_profiler.c(7902): error C2039: “exc_type”: 不是“_ts”的成员
d:\python\include\pystate.h(212): note: 参见“_ts”的声明
_line_profiler.c(7903): error C2039: “exc_value”: 不是“_ts”的成员
d:\python\include\pystate.h(212): note: 参见“_ts”的声明
_line_profiler.c(7904): error C2039: “exc_traceback”: 不是“_ts”的成员
d:\python\include\pystate.h(212): note: 参见“_ts”的声明
_line_profiler.c(7959): error C2039: “exc_type”: 不是“_ts”的成员
d:\python\include\pystate.h(212): note: 参见“_ts”的声明
_line_profiler.c(7960): error C2039: “exc_value”: 不是“_ts”的成员
d:\python\include\pystate.h(212): note: 参见“_ts”的声明
_line_profiler.c(7961): error C2039: “exc_traceback”: 不是“_ts”的成员
d:\python\include\pystate.h(212): note: 参见“_ts”的声明
_line_profiler.c(7962): error C2039: “exc_type”: 不是“_ts”的成员
d:\python\include\pystate.h(212): note: 参见“_ts”的声明
_line_profiler.c(7963): error C2039: “exc_value”: 不是“_ts”的成员
d:\python\include\pystate.h(212): note: 参见“_ts”的声明
_line_profiler.c(7964): error C2039: “exc_traceback”: 不是“_ts”的成员
d:\python\include\pystate.h(212): note: 参见“_ts”的声明
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2
----------------------------------------
ERROR: Command "'d:\python\python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\\Users\\AMARAN~1\\AppData\\Local\\Temp\\pip-install-o1auvf_5\\line-profiler\\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\AMARAN~1\AppData\Local\Temp\pip-record-rymmwo49\install-record.txt' --single-version-externally-managed --compile" failed with error code 1 in C:\Users\AMARAN~1\AppData\Local\Temp\pip-install-o1auvf_5\line-profiler\

首先,我想知道如何解决该问题。

第二,我想知道哪里出了问题。

第三,我想知道每个错误的含义,因为它们有点晦涩难懂。

PS:“” exc_type“:不是” _ts“的成员”意味着“”“ exc_type”:不是成员

of“ _ts””

谢谢〜

0 个答案:

没有答案