<P> On March 24, 2014, DreamWorks Pictures acquired the film rights to Paula Hawkins' debut novel, The Girl on the Train, which Marc E. Platt was set to produce through Marc Platt Productions . On January 13, 2015, Erin Cressida Wilson was hired to write the script for the film . On May 21, 2015, DreamWorks hired Tate Taylor to direct the film . On June 4, 2015, TheWrap reported that Emily Blunt was offered for the title role, the lonely and alcoholic divorcee Rachel . The studio had eyed Kate Mara for another of the three lead roles . In July 2015, the book's author Hawkins told The Sunday Times that the film's setting would be moved from London to Westchester, New York . On August 18, 2015, Deadline.com confirmed that Rebecca Ferguson was cast in the film to play Anna, one of three roles, along with Blunt . On August 24, 2015, Haley Bennett was added to the cast to play the third female lead role, Megan . </P> <P> On September 21, 2015, it was reported that Jared Leto and Chris Evans were in talks to join the film, where Evans would play Tom, Rachel's ex-husband, and Leto would play the neighbor's husband . On October 22, 2015, Édgar Ramírez joined the film to play Dr. Kamal Abdic, who is in an affair with the married Megan, and becomes a suspect in her disappearance . On October 27, 2015, Justin Theroux was cast in the film to play Tom, replacing Evans, who left the film due to a scheduling conflict . On October 28, 2015, Variety reported that Allison Janney had joined the film's cast to play a police detective . On November 3, 2015, Lisa Kudrow was cast in the film to play Martha, a former co-worker of Tom . On November 4, 2015, The Hollywood Reporter confirmed that Luke Evans had replaced Leto, who left the film due to a scheduling issue . On January 7, 2016, it was announced that Laura Prepon had joined the cast as Cathy, the landlord, roommate, and college friend of Rachel Watson . </P> <P> Principal photography on the film began on November 4, 2015, in New York City . In late November 2015, filming also took place in White Plains, as well as in Hastings - on - Hudson and Irvington, New York . Filming wrapped up on January 30, 2016 . </P> <P> During post-production on the film, Paula Hawkins' cameo was cut . </P>

Where was the girl on the train filmed