The precursor polyimide of the photoreactive polyimides(PI-SP6 and PI-SP12) was prepared from a derivative of 2, 2, 2-trifluoroethane dianhydride and 3,3'-dihydroxy-4,4'-diaminobiphenyl. PI-SP6 and PI-SP12 were then prepared by the polymer reactions of the precursor polyimide with photoreactive 2-styrylpyridine alkylene (hexylene and dodecylene) derivatives, respectively. The photoreactive polymers were soluble in organic solvents. The polymers showed the initial decomposition temperatures around . The glass transition temperatures of PI-SP6 and PI-SP12 were found to be and , respectively. This result means that the latter polymer is more flexible than the former polymer. Their transmittance in the film state was 90% at , which indicates that the photosensitive polyimides with thermal stability have high optical transparency even at the high temperature. The respective dichroic ratios of PI-SP6 and PI-SP12 were found to be 0.01 and 0.03 at an exposure energy of . This result suggests that the latter polymer with larger flexibility compared to the former polymer is more effective for the photoalignment.