我试图通过pyemd
在Python中安装pip
软件包并收到以下错误:
C:\Users\dipanwita.neogy>pip install pyemd
Collecting pyemd
Using cached pyemd-0.4.3.tar.gz
Requirement already satisfied: numpy<2.0.0,>=1.9.0 in c:\users\dipanwita.neogy\a
naconda3\lib\site-packages (from pyemd)
Building wheels for collected packages: pyemd
Running setup.py bdist_wheel for pyemd ... error
Complete output from command C:\Users\dipanwita.neogy\Anaconda3\python.exe -u
-c "import setuptools, tokenize;__file__='C:\\Users\\DIPANW~1.NEO\\AppData\\Loca
l\\Temp\\pip-build-nk13uh5b\\pyemd\\setup.py';f=getattr(tokenize, 'open', open)(
__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __fil
e__, 'exec'))" bdist_wheel -d C:\Users\DIPANW~1.NEO\AppData\Local\Temp\tmpngn2np
rmpip-wheel- --python-tag cp36:
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win32-3.6
creating build\lib.win32-3.6\pyemd
copying pyemd\__about__.py -> build\lib.win32-3.6\pyemd
copying pyemd\__init__.py -> build\lib.win32-3.6\pyemd
running build_ext
building 'pyemd.emd' 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 pyemd
Running setup.py clean for pyemd
Failed to build pyemd
Installing collected packages: pyemd
Running setup.py install for pyemd ... error
Complete output from command C:\Users\dipanwita.neogy\Anaconda3\python.exe -
u -c "import setuptools, tokenize;__file__='C:\\Users\\DIPANW~1.NEO\\AppData\\Lo
cal\\Temp\\pip-build-nk13uh5b\\pyemd\\setup.py';f=getattr(tokenize, 'open', open
)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __f
ile__, 'exec'))" install --record C:\Users\DIPANW~1.NEO\AppData\Local\Temp\pip-e
rihhtfj-record\install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build\lib.win32-3.6
creating build\lib.win32-3.6\pyemd
copying pyemd\__about__.py -> build\lib.win32-3.6\pyemd
copying pyemd\__init__.py -> build\lib.win32-3.6\pyemd
running build_ext
building 'pyemd.emd' 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:\Users\dipanwita.neogy\Anaconda3\python.exe -u -c "import setuptools,
tokenize;__file__='C:\\Users\\DIPANW~1.NEO\\AppData\\Local\\Temp\\pip-build-nk1
3uh5b\\pyemd\\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\DIPANW~1.NEO\AppData\Local\Temp\pip-erihhtfj-record\install-r
ecord.txt --single-version-externally-managed --compile" failed with error code
1 in C:\Users\DIPANW~1.NEO\AppData\Local\Temp\pip-build-nk13uh5b\pyemd\
我找不到任何有关此错误的信息。请建议我该怎么办?
答案 0 :(得分:2)
您收到的错误是:error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools
。您需要仔细阅读错误消息。
您只需转到他们为您提供的链接,然后按照说明操作:http://landinghub.visualstudio.com/visual-cpp-build-tools
答案 1 :(得分:0)
执行以下步骤可以帮助我克服错误:
Desktop development with C++
C++/CLI support for v142 build tools (14.24)
已准备好以下依赖项:
在CLI中获取Python --Version。
点安装C:\“ Twisted‑19.10.0‑cp36‑cp36m‑win_amd64.whl”
最终运行: