Search code examples
pythonflaskmarkdownflask-flatpages

Error when importing flask.ext.markdown


I have the following code :

#!/usr/bin/env python2
#coding: utf-8

from flask import Flask, render_template
from flask.ext.flatpages import FlatPages
from flask.ext.markdown import Markdown

But when I try to run it, this error occurs : ImportError: No module named flask.ext.markdown whereas normally this module is existing.

Is there somebody who can say how to fix that ?


Solution

  • It seems you need to install the flask-markdown plugin.

    http://pythonhosted.org/Flask-Markdown/

    You can install this with pip:

    pip install flask-markdown
    

    alternatively:

    easy_install flask-markdown
    

    If it is already installed try downloading the source and importing it directly.