[英]Unable to install hmmlearn in Python 3
Failed building wheel for hmmlearn Command "C:\\Users\\Akash\\PycharmProjects\\hello\\venv\\Scripts\\python.exe -u -c "import setuptools, tokenize;
hmmlearn命令“ C:\\ Users \\ Akash \\ PycharmProjects \\ hello \\ venv \\ Scripts \\ python.exe -u -c“导入setuptools,标记化; 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\\
文件 ='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'))“”安装--record C:\\ Users \\ Akash \\ AppData \\ Local \\ Temp \\ pip-record-z6k7p8b8 \\ install-record.txt-单一版本-外部管理-编译--install-headers C:\\ Users \\ Akash \\ PycharmProjects \\ hello \\ venv \\ include \\ site \\ python3。 6 \\ hmmlearn”在C:\\ Users \\ Akash \\ AppData \\ Local \\ Temp \\ pycharm-packaging \\ hmmlearn \\中失败,错误代码为1
this is the error showing in cmd and in pycharm also. 这是在cmd和pycharm中也显示的错误。 i found that Microsoft Visual Studio C++ 14 is required
我发现需要Microsoft Visual Studio C ++ 14
There are two ways to fix problems with packages that need Microsoft Build tools: 有两种方法可以解决需要Microsoft Build工具的软件包的问题:
1) Using the Anaconda package for Python. 1)将Anaconda软件包用于Python。 If your Python package was shipped with Anaconda, then you just need
conda install hmmlearn
. 如果您的Python软件包与Anaconda一起提供,
conda install hmmlearn
需要conda install hmmlearn
。 Personally, all package build errors are fixed for me using this. 就个人而言,使用此工具为我解决了所有软件包构建错误。
2) If you have a standalone installation of Python, then follow the steps below to fix: 2)如果您具有独立的Python安装,请按照以下步骤进行修复:
a) For Python 3.5, 3.6: Download and Install Microsoft Visual C++ Build Tools 2017 . a)对于Python 3.5、3.6:下载并安装Microsoft Visual C ++ Build Tools 2017 。
b) On the Visual Studio Download page, scroll down and select Tools for Visual Studio 2017. Click on the Download button for Build Tools for Visual Studio 2017
. b)在“ Visual Studio下载”页面上,向下滚动并选择“ Visual Studio 2017工具”。单击“ Visual Studio 2017
Build Tools for Visual Studio 2017
的“下载”按钮。
c) Restart your computer and try installing hmmlearn with pip install hmmlearn
. c)重新启动计算机,然后尝试通过
pip install hmmlearn
。
3) In some cases, where package build errors persist, you can consider building the package using wheels . 3)在某些情况下,如果包构建错误仍然存在,则可以考虑使用wheel构建包。
I hope this helps. 我希望这有帮助。
I had the same issue, asking me for Microsoft Visual Studio C++ 14 Build tools, I've tried every possible solution that I saw on Stackoverflow
and github
. 我遇到了同样的问题,向我询问Microsoft Visual Studio C ++ 14构建工具,我尝试了在
Stackoverflow
和github
上看到的所有可能的解决方案。
The only fix that worked form me is using the .whl
file in https://www.lfd.uci.edu/~gohlke/pythonlibs/#hmmlearn and more importantly using a 32-bit version of the whl
file (I just realized i was using 32bit Python3.6 while in a 64bit Win10 OS) 只有工作形成我的修复程序使用
.whl
文件https://www.lfd.uci.edu/~gohlke/pythonlibs/#hmmlearn更重要的是使用的32位版本whl
文件(我才意识到我在64位Win10操作系统中使用32位Python3.6)
In the specific .venv
folder, activate the environment and type: 在特定的
.venv
文件夹中,激活环境并键入:
pip install <yourdir>/hmmlearn‑0.2.1‑cp36‑cp36m‑win32.whl
I had the exact same issue - another source for the package which I wanted to install did it for me. 我遇到了完全相同的问题-我想要安装的软件包的另一个来源为我完成了该任务。 For example 'conda install hmmlearn' would cause the issue above.
例如,“ conda install hmmlearn”将导致上述问题。 But after checking anaconda.org for packages, I found the command 'conda install -c omnia hmmlearn' which solved the situation for me without any further Microsoft Visual C++ installation or action... Best, Lania
但是在检查anaconda.org的软件包之后,我找到了命令'conda install -c omnia hmmlearn',它为我解决了这种情况,而无需进行任何进一步的Microsoft Visual C ++安装或操作...最好,Lania
我正在运行Windows10。唯一对我有用的频道和后续命令是conda-forge:
conda install -c conda-forge hmmlearn
I faced the same issue for python 3.7. 对于python 3.7,我也遇到了同样的问题。 Downloading the wheel file from https://www.lfd.uci.edu/~gohlke/pythonlibs/#hmmlearn fixed the issue for me.
从https://www.lfd.uci.edu/~gohlke/pythonlibs/#hmmlearn下载wheel文件对我来说解决了这个问题。
I downloaded the hmmlearn‑0.2.1‑cp37‑cp37m‑win_amd64.whl (Since mine is a 64bit machine with python 3) 我下载了hmmlearn‑0.2.1‑cp37‑cp37m‑win_amd64.whl(因为我的计算机是带有python 3的64位计算机)
The github issue and fix for this can be found here https://github.com/hmmlearn/hmmlearn/issues/289 可以在这里找到github问题及其修复程序https://github.com/hmmlearn/hmmlearn/issues/289
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.