2 common things can cause that problem, air leak before the pump, and a faulty non return valve in the pump that allows fuel to drain back to the tank when car is off. Some of the crappy electric pumps can't even pressurise against a head of air in the line to push fuel thru to the carb.
Another problem I have seen is people ripping the fuel filter out and putting an electrical pump in just like the previous owner has done, and they have just left the mech pump in there figuring the electric will push the fuel thru it. Well, they will initially but the mech pump internals collapse (I wonder why they replaced it with an electric one in the first place
) creating a big resistance for the new pump which leads to fuel starvation.
Just check the old mech pump isn't still in circuit and has been bypassed. Best thing if you stick with electric is to rully remove the pump and put a blanking plate over the hole (or be really rough, cut the actuating lever off the pump near the case, clean all the filings out of it you just made and reinstall it to block the hole). This will stop the pump operating and at least prevent further engine damage if it fails mechanically internally (see my comment about why was it replaced in the first instance)
Another thing is a faulty or blocked tank inlet pipe, some have a filter on it as well that blocks, giving exactly the same symptoms as a faulty fuel pump. If you aren't getting fuel to the pump, it ain't gonna work. Get a bit of hose, put it on the line to the tank and blow (don't suck, unless you really like petrol) and get someone to put their ear to the filler with the cap off obviously and see if they can hear air bubbling into the tank. No bubbling, blocked line.