This article treats the problem of learning a dictionary providing sparse representations for a given signal class, via $\ell_1$ minimisation. The problem is to identify a dictionary $\dico$ from a set of training samples $\Y$ knowing that $\Y = \dico \X$ for some coefficient matrix $\X$. Using a characterisation of coefficient matrices $\X$ that allow to recover any basis as a local minimum of an $\ell_1$ minimisation problem, it is shown that certain types of sparse random coefficient matrices will ensure local identifiability of the basis with high probability. The necessary number of training samples grows up to a logarithmic factor linearly with the signal dimension.