When can an independent candidate file for nomination?

It is generally required that the petition for nomination be filed after the primary election