Orbital mechanics argues against pirate attacks, you need a specific deltaV to move from one orbit to another, and changing orbits means using more fuel, reaction mass or energy. In other words, you are essentially on a slot car track going to Jupiter, and the only way anyone can intercept you is to somehow get into the same "slot".
This also means pirates won't be able to get away easily; their ship is now also committed to the same orbit that you were, and they will either get a very nasty reception by customs when they arrive, or use a massive amount of energy getting into a new transfer orbit to somewhere else. A Space Navy or "coast guard" will easily see this (no stealth ion space) and can either set out to intercept, or radio ahead so the pirates will be getting a warm reception wherever they go.
There would be very few items of value that a space pirate would be able to seize that would cover the costs of running a spacecraft and all the intricate orbital manoeuvres needed to actually reach a ship in space, do the piracy then go somewhere else to sell the cargo.
Space pirates may well exist, but rather than sailing the space lanes, they will be hidden away at the space docks, manning tight beam communications platforms and probably hidden away in banks, import export offices and futures traders. In other words, successful space pirates will be taking down scores from the "inside".
The Future trader discovers a long term trend that would drive up the price of ice from Saturn's moons. They communicate to the traders, who start manipulating orders to take advantage of the market. Meantime, pirates manning the comm centre intercept the communications and pass on orders others to substitute worthless cargos on the shipping end, or stealing them from the docks on the receiving ends.
Spaceships ply the space ways in peace and serenity (indeed they might not be manned at all), while the skulking and piracy takes place in the docks and offices surrounding the spaceport.