It's about context. In the first sentence you are simply stating a fact about what happened to you in the past.
The second sentence would be used in relation to some other event or moment in the past, so saying it to this way sounds a bit strange.
But, if you "I had been living in London for 7 years, when I met my future wife". Then, the second sentence make sense, because you would be talking about the period of time before you met your wife to be, as well as the fact of meeting her.