Jessica Dieguez, of 127 St. Marks Pl., was charged with first-degree attempted robbery and with possession of a dangerous weapon.
The pharmacist told Dieguez to leave, police said, and called police. She left, but responding officers located her at the Roslyn railroad station and arrested her, police said.
No one was injured, police said.
Dieguez was to be arraigned Friday in First District Court, Hempstead.