首页 > 解决方案 > 安装 Jupyter 和 pywinpty (Python) 时出错

问题描述

我正在尝试在Python 3.7上安装 Jupyter,但似乎一次又一次地遇到这个错误;

winpty/cywinpty.c(598): fatal error C1083: Cannot open include file: 'winpty.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\BuildTools\\VC\\Tools\\MSVC\\14.14.26428\\bin\\HostX86\\x86\\cl.exe' failed with exit status 2

尝试通过 pip 安装 pywinpty 时出现相同的错误。

我已经安装并重新安装了构建工具但无济于事,并且命令窗口被提升 - 有什么想法吗?

更新:在 3.7 中没有完全解决 - 但在 3.6 中运行良好,我已经回滚了。

标签: pythonjupyter

解决方案


暂时,在标准方式不适用于 Python 3.7 之前,您可以使用Gohlke 集合pywinpty中的预构建轮子手动安装,然后使用.jupyterpip

要手动安装(从cmdPowershell),请使用: pip install drive:\path\to\the\wheel\pywinpty-0.5.4-cp37-cp37m-win_amd64.whl


推荐阅读