The 10.7 cm solar radio flux (F10.7) is a key indicator of solar activity. Accurately forecasting of F10.7 is crucial for reducing the impact of solar activity on fields such as radio communication, navigation, and satellite communication. In this work, we present a novel channel-independent patch time series Transformer (PatchTST) for F10.7 forecasting. This is the first time that the PatchTST model is applied to F10.7 forecasting. We construct the F10.7 dataset, which is measured by the Dominion Radio Astrophysical Observatory (DRAO) in Canada. We compare the performance of PatchTST, N-Beats, BiGRU, and CNN-BiGRU on DRAO data. The root mean squared error (RMSE), mean absolute percentage error (MAPE), and correlation coefficient (R) of our PatchTST model are 4.731, 2.351%, and 0.986, respectively, which outperforms those of the other models when the prediction length is 1 day. Especially in mid-term forecasting, the PatchTST model performs much better than those of the other models. We make uncertainty analyses on these models, and the PatchTST model exhibits superior adaptability to model uncertainty compared to the N-Beats, BiGRU, and CNN-BiGRU. The PatchTST model shows a 62.9% improvement in mean error (ME) and a 40.5% improvement in standard mean error (STDE) compared to the benchmark data provided by Space Environment Technologies (SET). This work also shows that our PatchTST model generalizes well by applying it to other F10.7 observational data originating from Long and Short-band Solar Precision Flux Radiotelescope (L&S) in China.