Photovoltaic output power has the characteristics of strong volatility and high randomness, which is highly sensitive to weather factors. A short-term photovoltaic power prediction method combines variational modal decomposition (VMD) and temporal convolutional network (TCN) with attention mechanism is proposed in this paper. Firstly, VMD decomposition method is used to decompose the time series of photovoltaic power into several modal components with different characteristics, the sub-series data with different time spans and weather factors were constructed to realize the decoupling of the original time series data and weather factors. Secondly, TPA mechanism was introduced into the TCN network to capture the potential logic rule of photovoltaic power time series based on reasonable allocation of different time step weights. The PV power is forecasted by reconstructing the sub-sequence prediction results. Finally, the proposed method is compared with the traditional methods based on the actual operation data, the results shows that the proposed method can effectively improve the predicting accuracy.