As far as I know, you have to have entered the country on a long-stay visa (Type D) in odrer to apply for a carte de sejour. So, I think that means you'll have to head back to your home country and then do the application process from there.
I found this page helpful if you need more info: Visa for Fance.
I found this page helpful if you need more info: Visa for Fance.