To install PLY on your machine for python2/3, follow the steps outlined below:
ply-3.10 folderpython setup.py installIf you completed all the above, you should now be able to use the PLY module. You can test it out by opening a python interpreter and typing import ply.lex.
Note: Do not use pip to install PLY, it will install a broken distribution on your machine.