I get the error below when installing flask in virtualenv on debian 7. apt-get-install tells me I already have GCC. I tried apt-get install libpcre3-dev
but then reinstalled flask with pip install Flask-scss --force-reinstall -I
but still got the same error. How do I fix this so that the speedups are used?
The Error:
markupsafe/_speedups.c:12:20: fatal error: Python.h: No such file or directory
compilation terminated.
==========================================================================
WARNING: The C extension could not be compiled, speedups are not enabled.
Failure information, if any, is above.
Retrying the build without the C extension now.
==========================================================================
WARNING: The C extension could not be compiled, speedups are not enabled.
Plain-Python installation succeeded.
==========================================================================
You need to install the python-dev
package too; it depends on the right package that contains Python.h
:
apt-get install python-dev
For those using Amazon Web Services (AWS) .
Install your system’s Development tool-chain per this reference:
yum (Amazon AMI, RedHat, Centos)
sudo yum groupinstall -y "Development Tools"
apt (Debian, Ubuntu, Mint)
sudo apt-get install -y build-essential
sudo apt-get install python-dev
Or
sudo apt-get install python3-dev for python3
This is a common problem on windows also when install libraries having c extensions. This problem in windows can be solved by install mingw, which stands for Minimalist GNU for Windows.
To install mingw for anaconda:
conda install mingw
To know more about mingw, have a look at http://www.mingw.org/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With