Why would you want to install a subpanel in an attic ? How many circuits and what kind of load is in this attic. What is the ceiling height ? Is there bedrooms is so then windows as required. Tell us more what you are doing in this attic, how much room in that attic and why not install branch circuits from main service panel to the attic to serve what you have up there.