Figured it out...
Go to
Tools>Preferences
Then go to
Converters
Select
LaTeX (pdflatex)-> PDF (pdflatex)
Where it says
Converter: pdflatex $$i
Change so that it reads
Converter: pdflatex $$i -enable-write18
Then click on the Modify button (Left-top)
Then click on the Apply and Save buttons (Left-bottom)
Restart Lyx and you're ready to go!