I have encountered the similar error when i accidentally given wrong path for the SEN2COR_BIN, in my case i provided the path of 2.8 version while i was running the 2.5 versio. so given the correct path this time it worked. one thing to be noted here is that there are different versions of sen2cor and on different os. so providing the right path is the key
i followed this one Sen2cor (detailled instructions) for correct installation.