1: The sahara desert is a complex ecosystem. Panels will damage it.
2: large parts are warzones.
3: It has mountains and other geography which get in the way.
4: There's this pesky stuff called "sand" which keeps moving around and burying anything that isn't mobile or wet.
5: "Generate power for the entire planet" is a major exaggeration. The Californian solar-thermal plant can't even generate enough power to feed more than 10% of houses _IN ITS AREA_. If African society increases its energy consumption to "western levels" it will account for every Joule generated and then some.
6: Exporting what it does generate will make Africa collectively even more pissed off about colonial expliotation than they already are
7: Even if that was to happen, you're talking about an infrastructure project a dozen times larger than anything ever built in the past, simply for electricity transmission, let along the panels - and losses over long-distance lines are substantial even with HVDC
8: If "we" are to reduce carbon emissions then that means not only converting existing carbon-fired systems to non-carbon sources, but also:
i: doubling it (at least) to take over from carbon-driven heating systems in cold climates (ground heat pumps and suchlike can only do so much) - heating accounts for as much carbon emission as electricity production and people won't stand for conventional nuke plants nearby so they can act as district heating.cooling systems too.
ii: doubling that result and then some, to account for transportation going more-electric (75% of carbon emissions are in transport)
Solar PV and wind simply don't have the energy density needed.