A spokesman for the Metropolitan Police said no arrest has yet been made.
He said: "A murder inquiry is now under way and an incident room will open in due course under detectives from the Specialist Crime and Operations Directorate.
"We must retain an open mind re the circumstances of the incident and any motive at this early stage."
Anyone with any information can call police on 101 or contact Crimestoppers anonymously on 0800 555 111.
More top news
George Osborne told MPs London would shoulder a large part of his 37% reduction in transport funding.
The prison was originally opened in 1852 as a mixed prison before becoming the first female-only local prison in England in 1902.
The victim was travelling between Seven Sisters and Highbury and Islington when she was assaulted.