glpk module import fails

Bug #1629672 reported by Ian Turner
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
ply (Ubuntu)
Won't Fix
Undecided
Unassigned
python-glpk (Ubuntu)
Won't Fix
Undecided
Unassigned

Bug Description

$ python
Python 2.7.12 (default, Jul 1 2016, 15:12:24)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import glpk
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/dist-packages/glpk/__init__.py", line 26, in <module>
    from glpk_parser import *
  File "/usr/lib/python2.7/dist-packages/glpk/glpk_parser.py", line 352, in <module>
    yacc.yacc(write_tables=0, debug=0)
  File "/usr/lib/python2.7/dist-packages/ply/yacc.py", line 3264, in yacc
    read_signature = lr.read_table(tabmodule)
  File "/usr/lib/python2.7/dist-packages/ply/yacc.py", line 1967, in read_table
    if parsetab._tabversion != __tabversion__:
AttributeError: 'module' object has no attribute '_tabversion'

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: python-glpk 0.4.52-1.1
ProcVersionSignature: Ubuntu 4.4.0-38.57-generic 4.4.19
Uname: Linux 4.4.0-38-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.1
Architecture: amd64
Date: Sun Oct 2 10:23:57 2016
InstallationDate: Installed on 2012-10-07 (1456 days ago)
InstallationMedia: Ubuntu 12.04.1 LTS "Precise Pangolin" - Release amd64 (20120822.4)
ProcEnviron:
 LANGUAGE=
 TERM=xterm
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: python-glpk
UpgradeStatus: Upgraded to xenial on 2016-04-09 (175 days ago)

Revision history for this message
Ian Turner (vectro) wrote :
Revision history for this message
Jonas Ribeiro (xikorj) wrote :

did anyone solve this?
i'm with the same problem

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in python-glpk (Ubuntu):
status: New → Confirmed
Revision history for this message
Sergio Torassa (sertorassa) wrote :

I just installed python-glpk in Ubuntu 16.04 and I see the same error.

Any news?

Revision history for this message
Norbert (nrbrtx) wrote :

Also seen on AskUbuntu - https://askubuntu.com/q/1111753/66509

Revision history for this message
Norbert (nrbrtx) wrote :

The real problem is python-ply. It is buggy.

The bug may be solved by installation of previous version to the home folder with pip:

  sudo apt-get install python-pip
  pip install ply==3.4 --user

Revision history for this message
James Page (james-page) wrote :

python-glpk is not present in any supported Ubuntu release so marking Won't Fix.

Changed in python-glpk (Ubuntu):
status: Confirmed → Won't Fix
Changed in ply (Ubuntu):
status: New → Won't Fix
Norbert (nrbrtx)
tags: added: bionic focal impish jammy
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.