hmmlearn命令“C:\ Users \ Akash \ PycharmProjects \ hello \ venv \ Scripts \ python.exe -u -c”的构建轮失败导入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-external-managed --compile --install-headers C:\ Users \ Akash \ PycharmProjects \ hello \ venv \ include \ site \ python3.6 \ hmmlearn“失败,错误代码为1:C:\ Users \阿卡什\应用程序数据\本地的\ Temp \ pycharm包装\ hmmlearn \
这是在cmd和pycharm中显示的错误。我发现需要Microsoft Visual Studio C ++ 14
有两种方法可以解决需要Microsoft Build工具的软件包的问题:
1)使用适用于Python的Anaconda软件包。如果您的Python包附带Anaconda,那么您只需要conda install hmmlearn
。就个人而言,使用此功能可以解决所有包构建错误。
2)如果您有独立的Python安装,请按照以下步骤进行修复:
a)对于Python 3.5,3.6:下载并安装Microsoft Visual C++ Build Tools 2017。
b)在Visual Studio下载页面上,向下滚动并选择Visual Studio 2017工具。单击Build Tools for Visual Studio 2017
的下载按钮。
c)重新启动计算机并尝试使用pip install hmmlearn
安装hmmlearn。
3)在某些情况下,如果包构建错误仍然存在,您可以考虑使用wheels构建包。
我希望这有帮助。
以管理员身份运行anaconda提示并尝试以下命令“conda install -c conda-forge hmmlearn”,从另一个通道安装包,或尝试链接中的任何其他通道:https://anaconda.org/search?q=hmmlearn
我有同样的问题,问我使用Microsoft Visual Studio C ++ 14 Build工具,我已经尝试过在Stackoverflow
和github
上看到的所有可能的解决方案。
我唯一能解决的问题是使用.whl
中的https://www.lfd.uci.edu/~gohlke/pythonlibs/#hmmlearn文件,更重要的是使用32位版本的whl
文件(我刚才意识到我在64位Win10操作系统中使用32位Python3.6)
在特定的.venv
文件夹中,激活环境并键入:
pip install <yourdir>/hmmlearn‑0.2.1‑cp36‑cp36m‑win32.whl
我有完全相同的问题 - 我想要安装的软件包的另一个来源为我做了。例如'conda install hmmlearn'会导致上述问题。但在检查了anaconda.org的包之后,我找到了命令'conda install -c omnia hmmlearn',它解决了我的情况,没有任何进一步的Microsoft Visual C ++安装或操作...... Best,Lania
我正在运行Windows 10.唯一适用于我的通道和后续命令是conda-forge:
conda install -c conda-forge hmmlearn
我遇到了python 3.7的同样问题。从https://www.lfd.uci.edu/~gohlke/pythonlibs/#hmmlearn下载wheel文件为我解决了这个问题。
我下载了hmmlearn-0.2.1-cp37-cp37m-win_amd64.whl(因为我的是一台带有python 3的64位机器)
github问题和解决方法可以在这里找到https://github.com/hmmlearn/hmmlearn/issues/289