python - 无法在 Python 3 中安装 hmmlearn

标签 python pycharm hmmlearn

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 构建工具,我已经尝试了我在 Stackoverflowgithub 上看到的所有可能的解决方案。< 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/

相关文章:

python - Django ImageField 未上传图像

python - 内部服务器错误 : Target WSGI script cannot be loaded as Python module AND IOError: [Errno 2] No such file or directory: 'client_secrets.json'

python - PyCharm 中用于 Python 编译扩展的自动完成功能

python - 在 Python 中使用 hmmlearn 学习字符序列

python - 使用连续隐马尔可夫模型的时间序列预测步骤

python - 将 BeautifulSoup 指向某个 <tr> 类

python - pycharm pytestrunner PluginManager 意外的关键字参数

python - 在 python 中调试到库

python - 如何从具有转换和计数的字典创建转换矩阵

Python os.st_uid 只返回值 0