阿里云服务器使用问题fatal error: Python.h: No such file or directory解决

阿里云服务器使用问题fatal error: Python.h: No such file or directory解决

安装Python包cython, 使用pip安装:

sudo pip install cython

出现问题:

fatal error: Python.h: No such file or directory


解决:

http://stackoverflow.com/questions/21530577/fatal-error-python-h-no-such-file-or-directory  

fatal error: Python.h: No such file or directory


sudo apt-get install python-dev  # for python2.x installs

sudo apt-get install python3-dev  # for python3.x installs


warning: no files found matching '*.pyx' under directory 'Cython/Debugger/Tests'

warning: no files found matching '*.pxd' under directory 'Cython/Debugger/Tests'

warning: no files found matching '*.h' under directory 'Cython/Debugger/Tests'

warning: no files found matching '*.pxd' under directory 'Cython/Utility'

Installing cython script to /usr/local/bin

Installing cygdb script to /usr/local/bin

Installing cythonize script to /usr/local/bin

Successfully installed cython


你可能感兴趣的:(Python)