Jeff Keppinger homered and had three RBIs, Brett Myers allowed two runs while working into the eighth inning and the Astros remained unbeaten in seven games against the National League's worst team this season with a 5-2 win Friday night.
Myers (7-6) extended his club record for consecutive starts of at least six innings to begin a season to 19 by allowing two runs on five hits in 7 2/3 innings, striking out four and walking one.
"I'm just trying to do my job; I'm not really trying to go out there and overpower guys or anything like that," Myers said. "I'm just trying to throw strikes and get us into the dugout as quick as possible."
Matt Lindstrom worked a perfect ninth for his 22nd save in 26 opportunities.
Andrew McCutchen went 2 for 4 with an RBI and a run for Pittsburgh, which has lost seven consecutive overall.
Making his first start in exactly one month, the Pirates' Zach Duke (3-9) pitched five effective innings, allowing two runs on five hits with no walks and five strikeouts. But he lost for the ninth time in his last 10 decisions.
"I feel good," Duke said. "I felt like the stuff was crisp, the curveball was good, the changeup was good, the fastball was down, so I like where I'm at physically."
In the Astros' first game with former star Jeff Bagwell as their hitting coach, the team scored at least five runs for only the third time in its past 10 contests.
This despite being without cleanup hitter Carlos Lee, who was not in the lineup a day after he missed a voluntary team workout in Pittsburgh to end the All-star break.
Keppinger, 7 for 13 in his past three games, has hit three of his four home runs this season in his past six games. He also had an RBI double in the seventh and drove in Jason Bourgeois with a groundout in the first.
That meant the Pirates had allowed at least one first-inning run for the sixth time in their past seven games. This came without a ball reaching the outfield -- an infield single, two stolen bases and a groundout.
"Those are the things we've got to do, get the big hits with two outs, and we've got to be able to move runners around," Keppinger said.
McCutchen scored on Neil Walker's sacrifice fly in the fourth.
D.J. Carrasco relieved Duke in the sixth, and Keppinger took the first pitch he threw and hit it just inside the left-field foul pole to make it 3-1. Later that inning, Pence scored on a squeeze play with Angel Sanchez at the plate.
The Pirates chased Myers in the eighth when McCutchen's two-out single drove in Lastings Milledge. Jose Tabata followed with a single off of Brandon Lyon, but Walker's sinking liner to left was caught by a running Bourgeois to end the threat.
"All wins feel good, but it was nice to see the guys play real well," Houston manager Brad Mills said. "They really did a good job defensively, and offensively we did some things that are good. ... Then, of course, it's always good to lean back on Myers having such a big outing."
The Pirates threw two wild pitches, had a balk, a runner picked off second and failed to record an out when they had Pence caught in a rundown in the fourth.
"Not the kind of game you're looking for anytime," Pittsburgh manager John Russell said. "A few too many mistakes, mental lapses. But again, we've got to take some heat off those mistakes by scoring some runs, and we just didn't do it. Myers was good."
After the game, the Astros placed RHP Brian Moehler on the disabled list due to a strained right groin. It was retroactive to July 8. The move was necessitated because RHP Felipe Paulino (right shoulder tendinitis) will be sent back to Houston to have an MRI performed after a setback during a throwing session Friday. He will not come off the disabled list in time to start Tuesday, as scheduled. ... The Pirates have had five losing streaks of at least five games this season. This is the third time they have lost seven in a row.