"I was fortunate that we got a couple of runs and I was able to get out of a couple of jams," Carpenter said. "I made my pitches."
Carpenter (8-3) became the latest pitcher to stifle the Astros' punchless offense, striking out six and walking two for his fourth win in five starts. Julian Tavarez got three outs for his third save.
Carpenter gave up eight hits and joined a list of starters that ranges from teammate Mark Mulder to Atlanta's Tim Hudson to Milwaukee's Doug Davis in keeping Houston scoreless for at least seven innings.
"He was outstanding," Cardinals manager Tony La Russa said. "You have to give Houston some credit, though. They generated enough offense tonight that they shouldn't have gotten shut out."
The Astros have been shut out a major league-leading 10 times this season, including a 9-0 loss to Cincinnati's Aaron Harang on Monday.
"I don't know if we're pressing or not," said Astros shortstop Adam Everett, who went 3-for-3 with a double. "We had some opportunities today, and we hit the ball hard but just right at someone."
St. Louis found the perfect opponent for a rebound after splitting a four-game series with lowly Colorado.
Jim Edmonds' run-scoring double in the third gave the Cardinals a 1-0 lead, one that would prove too much to overcome for the worst-hitting club in the majors.
The Astros bungled a couple prime opportunities to score in the fifth.
Taveras followed with a liner to right, but So Taguchi scooped up the ball and easily cut down the plodding Pettitte at the plate to end the inning. That ugly sequence was followed by a loud chorus of boos from the crowd of 34,092.
Astros manager Phil Garner insisted that third base coach Doug Mansolino's decision to wave Pettitte around was the correct one, especially for a club struggling to generate offense.
"I want to send him," Garner said. "If they make a play or a throw, then that's fine."
Pettitte, never known for his foot speed, wasn't so sure.
"I know I'm slow but I don't think I'm that slow," he said. "Obviously, I don't think I should have went."
Pettitte (3-6) allowed five hits in seven innings, striking out five with no walks. But his solid effort was wasted -- again -- as the Astros came up with nothing against Carpenter.
"I feel for him," Garner said. "This was one of his better games this season."
Pujols backed Carpenter in the ninth with a solo shot that bounced off the replica 1860 railroad tracks atop the 58-foot wall in left. It was his 13th homer of the season.
St. Louis improved to 15-4 in the first game of a series. ... Pettitte singled in the fifth, his first hit of the season. He was 0-for-15 before that. ... Cardinals outfielder Reggie Sanders stole two bases in the sixth for his first multisteal game of the year. ... The Astros went with an all-rookie outfield of Chris Burke, Taveras and Todd Self for the second straight game. ... Fans were evacuated from their seats about 45 minutes before the game after a fire alarm went off. The alarm sounded after a water flow sensor activated in the upper concourse of the ballpark, and fans were soon able to return to their seats.