(ubuntu) pip install scandir 时出现错误 fatal error: Python.h: No such file or directory

Posted tlz888

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了(ubuntu) pip install scandir 时出现错误 fatal error: Python.h: No such file or directory相关的知识,希望对你有一定的参考价值。

  安装 jupyter时遇到这个问题,在这里查到了解决方法,特记录一下。

  解决方式为:

先安装 python-dev:

$ sudo apt-get install python-dev

然后再安装需要的包:

pip install scandir

 

以上是关于(ubuntu) pip install scandir 时出现错误 fatal error: Python.h: No such file or directory的主要内容,如果未能解决你的问题,请参考以下文章