Ganzi characters may get it
The Ganzi (from Planar Adventures) is a native outsider race (like tiefling and aasimars) with ties to the Maelstrom, the chaotic neutral plane, and one of their racial traits is called an Oddity. Players with Ganzi characters can pick, or roll a 1d20 to randomly determine (at GM discretion), what form their characters’ oddities take using the list.
Typically, a ganzi’s oddity is chosen from the most common manifestations of entropy listed below, but other, more unique oddities can certainly exist.
And one of those oddities are is the ability to be trained in all simple and martial weapons.
Weaponplay (Ex): Ganzis with lineages that link to the valkyries manifest their heritage in their skill in combat. Such ganzi are always proficient with all simple and martial weapons, and they can qualify for feats normally available only to fighters (such as Weapon Specialization) even if they don’t have any fighter class levels.
Otherwise, there isn't
The ability to gain proficiency in all martial weapons is exclusive to certain classes and archetypes, none of which are available for wizards (or archetypes).
Though, if you require proficiency with a specific martial weapon, the Opalescent White Pyramid Ioun Stone can grant you that. But this will not help if you are trying to qualify for the Eldritch Knight prestige class.
Multiclass into another prestige class
A less desirable choice would be to qualify for another prestige class that does not reduce your spellcasting progression and still grants you all martial weapons proficiency.
However, I checked every prestige class published and none meet these criteria. The closest you get is a single weapon or armor proficiency and still keep your spellcasting progression. All available prestige classes that do increase your spellcasting progression and grant martial weapons proficiency, will not increase your spellcasting progression at first level, like the Arcane Archer or Skyseeker.
The Favoured Prestige Class and Prestigious Spellcaster feats will help you recover the missing spellcaster level if that is all you are worried about. But you will have to balance the cost of two feats against one spellcaster level, on top of the requirements for the new prestige class.
You have third-party options
However, there are third-party solutions, like the Martial Weapon Group Proficiency from Flaming Crab Games's Forgotten Core Feats book, that grants exactly that, proficiency with all martial weapons.