Is a photovoltaic system ecological ?

Basically yes, after the energy required for the production of the components involved has been generated again by the operation. Only then does the "green", ecological phase begin.