I want to install python-glpk I followed the instructions here:
But when I tried to do this:
import glpk print glpk.glp_version() I have these errors

Thank you
11 Answer
Bug
For Ubuntu 16.04 LTS it is known issue - it was reported to LaunchPad.net on 2016-10-02 as bug 1629672.
Fix
We can fix this bug by installation of previous version of python-ply component with pip into your home folder:
#sudo apt-get install python-glpk # you did this before in question sudo apt-get install python-pip pip install ply==3.4 --user And then test it with simple script (name it glpk_test.py) with contents:
#!/usr/bin/python2 import glpk print glpk.glp_version() then make it executable with chmod +x glpk_test.py and execute with ./glpk_test.py.
The output on Ubuntu 16.04 LTS will be:
24.57