The woman was stopped near Sixt and Coronado streets about 4:40 a.m., officials said. She was screaming and waving the knife when officers spotted her, officials said.
The officer ordered the woman to "put the knife down." When she refused, the officer fired two bean bag rounds at her, said Sgt. Melvin Gamble of the Rampart Station.
"We hit her twice, and still the second one didn't put her down," Gamble said. "But she dropped the knife."
Gamble said she was apparently upset about a child of hers who was molested years ago. He said she felt the justice system wasn't working fast enough.
The woman refused medical treatment, but was taken to receive a mental health evaluation.
The incident comes three weeks from where a bicycle officer fatally shot Guatemalan day laborer Manuel Jaminez.
Jaminez was shot in the head near Sixth Street and Union Avenue when he allegedly lunged at an officer with a knife in hand after threatening passersby, including a pregnant woman and 4-year-old boy.
The killing set off several days of unrest in the immigrant-dense neighborhood.
Activists and neighbors found it hard to understand why police did not use less-than-lethal means to subdue Jaminez. Some claim Jaminez did not have a knife in his hand.
City News Service contributed to this report.