James Franco has split from his long-term girlfriend Ahna O'Reilly

The '127 Hours' actor has confirmed his five-year romance with Ahna O'Reilly has ended because he is so busy with his other education commitments, although he did not reveal when they ended their relationship.

James – who has been studying at Yale University, New York University, Warren Wilson College in North Carolina, Brooklyn College and Columbia University – told the new issue of Playboy magazine: "It's over. That lasted about four or five years. We'd been living together in Los Angeles and then came to New York to go to school for two years. Then I signed up for more school at Yale. I think that was it for her."

James admits he hasn't had much luck with women, particularly when he was at school because he was so "shy and awkward".

Asked when he lost his virginity, he said: "In high school with my girlfriend. Her name was Jasmine. We went out freshman year and then I blew it. She kind of got over me, but we got back together at the beginning of junior year and dated for two years. She was my first real relationship.

"I think girls liked me, but I was awkward, shy and emotionally immature, so I didn’t have a ton of girlfriends. I had short-term relationships and always got dumped, I think because I was too slow for them."

Sir Paul McCartney is to marry Nancy Shevell in London

'Twilight's' Robert Pattinson turned down James Franco's Brad Renfro tribute movie - VIDEO

Recently split from Scarlett Johansson, Sean Penn is now dating Stacey Koplin