pip安装pyemd错误?

pip install pyemd error?

我正在尝试通过 pip 在 Python 中安装 pyemd 软件包,但出现以下错误:

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\

我找不到关于此错误的任何信息。请建议我该怎么办?

您收到的错误是:error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools。您需要仔细阅读错误信息。

您只需前往他们为您提供的 link 并按照说明操作即可:http://landinghub.visualstudio.com/visual-cpp-build-tools

按照以下步骤帮助我克服了错误:

  1. 安装 Visual Studio 时:Download Visual Studio
    • -> Desktop development with C++
    • -> 检查 C++/CLI support for v142 build tools (14.24)
  2. 准备好以下依赖项

    • get Python --CLI 中的版本。

    • Twisted WHL file

    • 下载并安装 whl 文件
    • pip 安装 C:\"Twisted‑19.10.0‑cp36‑cp36m‑win_amd64.whl"

  3. 最后运行

    • pip 安装-v pyemd