A/C Compressor knocking

I just installed a new a/c compressor on my 318. I'm getting a knocking sound whenever the compressor is on. It doesn't happen when its off. Anyone have any idea? Thanks