Failed building wheel for hmmlearn Command "C:\Users\Akash\PycharmProjects\hello\venv\Scripts\python.exe -u -c "import setuptools, tokenize;file='C:\Users\Akash\AppData\Local\Temp\pycharm-packaging\hmmlearn\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\Akash\AppData\Local\Temp\pip-record-z6k7p8b8\install-record.txt --single-version-externally-managed --compile --install-headers C:\Users\Akash\PycharmProjects\hello\venv\include\site\python3.6\hmmlearn" failed with error code 1 in C:\Users\Akash\AppData\Local\Temp\pycharm-packaging\hmmlearn\
这是在 cmd 和 pycharm 中显示的错误。 我发现需要 Microsoft Visual Studio C++ 14
最佳答案
我有同样的问题,向我询问 Microsoft Visual Studio C++ 14 构建工具,我已经尝试了我在 Stackoverflow
和 github
上看到的所有可能的解决方案。< br/>
唯一对我有效的修复是使用 https://www.lfd.uci.edu/~gohlke/pythonlibs/#hmmlearn 中的 .whl
文件更重要的是使用 32 位版本的 whl
文件(我刚刚意识到我在 64 位 Win10 操作系统中使用的是 32 位 Python3.6)
在特定的 .venv
文件夹中,激活环境并键入:
pip install <yourdir>/hmmlearn‑0.2.1‑cp36‑cp36m‑win32.whl
关于python - 无法在 Python 3 中安装 hmmlearn,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51002441/