The role of anisotropic components on the dark energy and the dynamics of the universe is investigated. An anisotropic dark energy fluid with different pressures along different spatial directions is assumed to incorporate the effect of anisotropy. One dimensional cosmic strings aligned along x-direction supplement some kind of anisotropy. Anisotropy in the dark energy pressure is found to evolve with cosmic expansion at least at late times. At an early phase, the anisotropic effect due to the cosmic strings substantially affect the dynamics of the accelerating universe.