If you qualify to apply under one of the 29 occupations and the cap for it is not yet full and you have 67 or more points, you are allowed to apply. It is not important where you are located and what you are doing at the time (in Canada studying for example).
If you do not qualify to apply under the skilled worker program, there is no other program that will allow a student to apply until they have graduated and possibly even have a job offer or have worked for a year already. If you go on a work permit, you can work for 2 years and then apply under Canadian experience class. If you do a 2 year course, graduate and work a skilled job for a year, same thing. Different provincial nominee program may also let you apply as a graduate, with or without a job offer, possibly after having worked for 6 months.
I heard from an immigration lawyer in Qubec that as an international student already in Canada, I need to have a signed employment letter in order to apply. Please I need clarifications on this because I qualify for Federal skilled by any ramification and the slot for my profession has not been filled