If you break the top e string during installation of a new set, you can certainly buy a single e string. There is no need to buy a whole set if the strings you did not break are all new.
I shop at Just Strings dot com for individual strings. Here is a link to their single guitar strings page Single Strings at Just Strings
Here you will find single strings from many of the major manufacturers in various gauges. Try to pick one that most closely matches the one you are replacing in composition, type, gauge and brand. The high e string is a plain steel string so most brands will be interchangeable. Just get the same gauge as the one you broke. Or you can get a different gauge if you prefer.
Some local guitar shops might carry a selection of individual strings as well - and you will save the shipping costs. When I buy individual strings on line, I buy several because there is not much difference in shipping cost between one string or ten strings.
I buy single strings because I like to choose each gauge of my sets individually. I might have heavier bottoms for more base and lighter tops for easier bending.
Also, I like to keep a few extras of the strings most likely to break. In addition to the thinnest high e-string, a wound G string is very susceptible to breaking as well. The reason is the steel core (where the tensile strength comes from) of a wound G string is actually thinner in diameter than the high e string. So next time you hear a guitarist complain from the stage that their G String just broke, you will know they are not trying to be funny. It was most likely the g string that broke.
If I break a string on stage, I can't take time to change an entire set and I don't like to rob a full set just to get one string because then when I go to install that set it will be a string shy of a full set.
Good luck with your next install. Be sure to stretch your strings gently after installation. Also, if your string breaks near the bridge - check to be sure there is nothing sharp on your saddle that might cut into the string. And tune the high e up very slowly.