Python Language Python Lex-Yacc Getting Started with PLY


To install PLY on your machine for python2/3, follow the steps outlined below:

  1. Download the source code from here.
  2. Unzip the downloaded zip file
  3. Navigate into the unzipped ply-3.10 folder
  4. Run the following command in your terminal: python install

If 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.