Updated

James McDonald is growing up in front of manager Clint Hurdle's eyes. Too bad Pittsburgh's offense isn't doing the same.

The right-hander sparkled yet again — allowing one run on four hits in eight innings, striking out eight, but the Pirates fell to the Astros 1-0 on Friday night.

"It's fun to watch this young man take this step forward," Hurdle said.

And just as painful to watch the Pirates squander opportunities. Pittsburgh had a runner on third with no outs in the fourth and loaded the bases with no outs in the sixth, but failed to cash in while getting shut out for the fourth time this season.

"When the game gets hard, it looks more difficult to play than it is," Hurdle said. "Nobody's beating themselves up more than those guys. We've got to find a way to continue to push through it."

McDonald (2-2) was hardly complaining about the lack of run support after lowering his ERA to 2.42.

"It's part of the game," he said. "I've been that guy on the mound when I've gotten shelled ... they did what I asked them for today, played hard behind me."

The Pirates just didn't always play crisply. Jose Tabata was nailed at home trying to score from third on a grounder to shortstop, Andrew McCutchen was caught stealing and Josh Harrison was picked off first in the eighth.

"Sometimes you look good, sometimes you look absolutely ridiculous (on the bases)," Pittsburgh second baseman Neil Walker said. "The last week or so, we've just been caught in funny situations."

Bud Norris (3-1) allowed three hits in six sharp innings and struck out eight without walking a batter for the Astros.

Brett Myers pitched the ninth for his ninth save.

The Astros, who had baseball's worst record last season, have been a modest surprise so far this spring. They improved to 7-3 in their in their last 10 games by getting contributions all over the place.

"In a game like this, there's going to be a lot of guys who do a lot of good things, and that's exactly what happened tonight," Houston manager Brad Mills said.

The Astros are 6-1 when Norris starts, getting all the offense they needed in the second when Brian Bogusevic led off with a single and went to third on Chris Johnson's single to right. Bogusevic scored when Justin Maxwell grounded into a double play.

The Astros didn't get a runner to third the rest of the game, but it hardly mattered.

Norris dropped his ERA to 3.95 by effectively keeping the Pirates off balance. Three relievers did the rest as Houston's bullpen — which was last in the National League in ERA in 2011 — continued its stellar performance.

The Pirates were hoping a nine-game homestand would give them some needed momentum. Instead, they're just 3-4 with two games remaining, their loss Friday night reminiscent of several recent missed opportunities.

Pittsburgh loaded the bases in the sixth on two hits and an error, but couldn't get the big hit it needed.

Tabata worked the count full before striking out on a 92 mph fastball from Norris. Nate McLouth popped up meekly to second and McCutchen couldn't check his swing on a 2-2 breaking ball as the crowd groaned in frustration.

It wouldn't be the last time.

The Pirates' final gasp came in the eighth when Barajas led off with a single. He was replaced by Josh Harrison, and Barmes attempted to bunt Harrison to second when things got weird.

Barmes pulled back after squaring up when a pitch from Wilton Lopez got a little too far inside. The ball appeared to bounce off Barmes' bat — which was still squared up — and roll into foul territory. Because there were two strikes, plate umpire James Hoye declared Barmes out for bunting foul with two strikes.

Hurdle came out to argue, and Barmes was given a second chance.

When Houston manager Brad Mills asked for an explanation, he was ejected by first base umpire Jim Joyce.

Mills needn't have worried. Lopez picked off Harrison and retired Barmes as the Pirates went quietly again.

Notes: Pittsburgh starting pitcher Jeff Karstens, on the 15-day disabled list with right shoulder inflammation, could begin side sessions in the bullpen next week, though his return is still uncertain. ... The series continues Saturday. J.A. Happ (2-2, 5.24 ERA) starts for the Astros against Charlie Morton (1-3, 4.61). ... The Astros improved to 5-9 on the road. ... Houston infielder Jose Altuve went 0 for 3 with a walk while batting third for the first time in his career.