我将要安装ipython的line profiler,使用的是anaconda来运行python。
当前的python版本为:
Python 3.6.2 |Anaconda, Inc.| (default, Sep 19 2017, 08:03:39) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
当我试图使用pip安装行分析器时,出现了以下错误输出。
注意:我正在运行带有Python的Anaconda。
C:\Users\dsandhu>pip install line_profiler
Collecting line_profiler
Using cached https://files.pythonhosted.org/packages/14/fc/ecf4e238bb601ff829068e5a72cd1bd67b0ee0ae379db172eb6a0779c6b6/line_profiler-2.1.2.tar.gz
Requirement already satisfied: IPython>=0.13 in c:\program files (x86)\microsoft visual studio\shared\anaconda3_64\lib\site-packages (from line_profiler) (6.1.0)
Requirement already satisfied: setuptools>=18.5 in c:\program files (x86)\microsoft visual studio\shared\anaconda3_64\lib\site-packages (from IPython>=0.13->line_profiler) (36.5.0.post20170921)
Requirement already satisfied: jedi>=0.10 in c:\program files (x86)\microsoft visual studio\shared\anaconda3_64\lib\site-packages (from IPython>=0.13->line_profiler) (0.10.2)
Requirement already satisfied: decorator in c:\program files (x86)\microsoft visual studio\shared\anaconda3_64\lib\site-packages (from IPython>=0.13->line_profiler) (4.1.2)
Requirement already satisfied: pickleshare in c:\program files (x86)\microsoft visual studio\shared\anaconda3_64\lib\site-packages (from IPython>=0.13->line_profiler) (0.7.4)
Requirement already satisfied: simplegeneric>0.8 in c:\program files (x86)\microsoft visual studio\shared\anaconda3_64\lib\site-packages (from IPython>=0.13->line_profiler) (0.8.1)
Requirement already satisfied: traitlets>=4.2 in c:\program files (x86)\microsoft visual studio\shared\anaconda3_64\lib\site-packages (from IPython>=0.13->line_profiler) (4.3.2)
Requirement already satisfied: prompt_toolkit<2.0.0,>=1.0.4 in c:\program files (x86)\microsoft visual studio\shared\anaconda3_64\lib\site-packages (from IPython>=0.13->line_profiler) (1.0.15)
Requirement already satisfied: pygments in c:\program files (x86)\microsoft visual studio\shared\anaconda3_64\lib\site-packages (from IPython>=0.13->line_profiler) (2.2.0)
Requirement already satisfied: colorama in c:\program files (x86)\microsoft visual studio\shared\anaconda3_64\lib\site-packages (from IPython>=0.13->line_profiler) (0.3.9)
Requirement already satisfied: ipython_genutils in c:\program files (x86)\microsoft visual studio\shared\anaconda3_64\lib\site-packages (from traitlets>=4.2->IPython>=0.13->line_profiler) (0.2.0)
Requirement already satisfied: six in c:\program files (x86)\microsoft visual studio\shared\anaconda3_64\lib\site-packages (from traitlets>=4.2->IPython>=0.13->line_profiler) (1.10.0)
Requirement already satisfied: wcwidth in c:\program files (x86)\microsoft visual studio\shared\anaconda3_64\lib\site-packages (from prompt_toolkit<2.0.0,>=1.0.4->IPython>=0.13->line_profiler) (0.1.7)
Building wheels for collected packages: line-profiler
Running setup.py bdist_wheel for line-profiler ... error
Complete output from command "c:\program files (x86)\microsoft visual studio\shared\anaconda3_64\python.exe" -u -c "import setuptools, tokenize;__file__='C:\\Users\\dsandhu\\AppData\\Local\\Temp\\pip-install-0llx4z1k\\line-profiler\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d C:\Users\dsandhu\AppData\Local\Temp\pip-wheel-63ockg8z --python-tag cp36:
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.6
copying line_profiler.py -> build\lib.win-amd64-3.6
copying kernprof.py -> build\lib.win-amd64-3.6
copying line_profiler_py35.py -> build\lib.win-amd64-3.6
running build_ext
skipping '_line_profiler.c' Cython extension (up-to-date)
building '_line_profiler' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools
----------------------------------------
Failed building wheel for line-profiler
Running setup.py clean for line-profiler
Failed to build line-profiler
Installing collected packages: line-profiler
Running setup.py install for line-profiler ... error
Complete output from command "c:\program files (x86)\microsoft visual studio\shared\anaconda3_64\python.exe" -u -c "import setuptools, tokenize;__file__='C:\\Users\\dsandhu\\AppData\\Local\\Temp\\pip-install-0llx4z1k\\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\dsandhu\AppData\Local\Temp\pip-record-za9vqo8p\install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.6
copying line_profiler.py -> build\lib.win-amd64-3.6
copying kernprof.py -> build\lib.win-amd64-3.6
copying line_profiler_py35.py -> build\lib.win-amd64-3.6
running build_ext
skipping '_line_profiler.c' Cython extension (up-to-date)
building '_line_profiler' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools
----------------------------------------
Command ""c:\program files (x86)\microsoft visual studio\shared\anaconda3_64\python.exe" -u -c "import setuptools, tokenize;__file__='C:\\Users\\dsandhu\\AppData\\Local\\Temp\\pip-install-0llx4z1k\\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\dsandhu\AppData\Local\Temp\pip-record-za9vqo8p\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\dsandhu\AppData\Local\Temp\pip-install-0llx4z1k\line-profiler\