The error occurs due to an error during the installation process. If you install via pip on an Ubuntu system and you get this warning:
========================================================================== WARNING: The C extension could not be compiled, speedups are not enabled. Plain-Python installation succeeded. ==========================================================================
Then you need to make sure that you have the libpcre3-dev library installed (this is the module containing pcre.h , the module with which the C-installation fails):
apt-get install libpcre3-dev
After that, reset the -scss checkbox:
pip install Flask-scss
After restarting the Flask server, the error should be a thing of the past.
But please pay attention
Although the _speedups not found error will be resolved above, there is another probable reason that your files will not be compiled. If you have a code like this:
app = Flask(__name__) from flask.ext.scss import Scss Scss(app, static_dir='static', asset_dir='assets') ... if __name__ == "__main__": app.run(debug=True)
and you are not installing debug anywhere else, then you have to install
app.debug = True
before calling the Scss object:
app.debug = True Scss(app, static_dir='static', asset_dir='assets')
Happiness! This should do the trick so that your .scss files are collected every time you load the page in debug mode.
source share