NOVELTY - Preparing polyimide membrane, comprises: (a) preparing a polyimide membrane from dianhydride e.g. 1,1,1,3,3,3-hexafluoro-2,2-propylidene diphthalic acid dianhydride and at least one diisocyanate comprising e.g. 2,3,4,5-tetramethyl-1,4-phenylene diisocyanate; and (b) annealing the membrane at a temperature of 280 degrees C to glass transition temperature of the polymer surrounded with a gas atmosphere having low oxygen content, such as inert gas, preferably nitrogen, at a specified distance.    USE - The process is useful for preparing polyimide membrane, preferably polyimide hollow fiber membrane, which is useful for separating gas mixtures, preferably for separating methane and carbon dioxide, oxygen and nitrogen, hydrogen from process gases, and/or water vapor and/or helium from gases or gas mixtures (all claimed).    ADVANTAGE - The process produces polyimide membrane having improved chemical and physical properties, such improved molecular weight and chemical stability in a cost effective manner.    DETAILED DESCRIPTION - Preparing polyimide membrane, comprises: (a) preparing a polyimide membrane made from at least one dianhydride comprising 3,4,3'4'-benzophenonetetracarboxylic acid dianhydride, 1,2,4,5-benzenetetracarboxylic acid dianhydride, 3,4,3'4'-biphenyltetracarboxylic acid dianhydride, oxydiphthalic acid dianhydride, sulfonyldiphthalic acid dianhydride or 1,1,1,3,3,3-hexafluoro-2,2-propylidene diphthalic acid dianhydride and at least one diisocyanate comprising toluene-2,4-diisocyanate, toluene-2,6-diisocyanate, 4,4'-methylenediphenyl diisocyanate, 2,4,6-trimethyl-1,3-phenylenediisocyanate or 2,3,4,5-tetramethyl-1,4-phenylene diisocyanate; and (b) annealing the membrane at a temperature of 280 degrees C to glass transition temperature of the polymer, preferably 310-320 degrees C surrounded with a gas atmosphere having low oxygen content in a distance up to 10 cm, preferably 2-10 cm. The membrane during the heat treatment is surrounded with a gas atmosphere having an oxygen content of less than or equal to 0.5 vol.%, such as inert gas, preferably nitrogen, with corresponding low oxygen content. An INDEPENDENT CLAIM is included for the polyimide membrane produced by the method, where membrane comprises 0-5 wt.%, preferably 0-1 wt.%, of polymer and crosslinking substances, and has a solubility in dimethylformamide of 5-95%, preferably 20-70% and a layer thickness of the active layer separated by less than or equal to 1.5 mu m, preferably less than or equal to 100 nm.