Installing open cv plz help me

On my raspberry pi I am working on a project that requires open cv and when I go to import it, it tells me that I do not have it so I was wondering if anyone could help me or better yet create some code that will direct and locate a smile on an image from a web cam

Thanks Thomas