Only by obtaining a Visa and applying once you arrive in Canada.
You can't apply from outside.
The other, recommended, alternative is to flee from your country and register with UNHCR as a refugee. They are then responsible for your possible resettlement.