Yes, but you then need to have an already developed full supply chain, and for that you need to bootstrap your energy production first hand.
My personal hope is that there might be some untapped resources of hydrocarbons or methane in Mars that could be used to generate energy from local sources.