编译Cython扩展错误 - Pycharm IDE

RED*_*LAL 18 python compiler-errors cython pycharm python-3.x

非零退出代码(1): _ pydevd_bundle/pydevd_cython.c:13:20:致命错误:Python.h:没有此类文件或目录编译终止.错误:命令'x86_64-linux-gnu-gcc'以退出状态1失败

请帮我解决尝试在PyCharm中安装Cython的错误.

小智 21

JetBrains提供了一个答案:

https://www.jetbrains.com/help/pycharm/2017.3/cython-speedups.html

如果您使用的是Ubuntu,请运行:

对于Python 2.7: sudo apt-get install python-dev

对于Python 3.5: sudo apt-get install python3-dev

对于Python 3.6: sudo apt-get install python3.6-dev