class GzipFile(io.BufferedIOBase): AttributeError: 'module' object has no attribute 'BufferedIOBase' installing python tables
Question: I have a problem while installing python tables. There is something missing or
corrupt in my path or dependencies that I can not solve.

When I'm using a Python program that uses tables, it returns:

    
    
      File "/usr/lib/python2.7/dist-packages/io.py", line 331, in 
        def bget(imfile,shp=None,unpackstr=N.int16,bytesperpixel=2.0,sliceinit=0):
    AttributeError: 'module' object has no attribute 'int16'
    

And simply importing tables from python shell:

    
    
    ...
    File "/usr/lib/python2.7/gzip.py", line 36, in 
    class GzipFile(io.BufferedIOBase):
    AttributeError: 'module' object has no attribute 'BufferedIOBase'
    

tables is installed in:

    
    
    /usr/local/lib/python2.7/dist-packages/
    

My PYTHONPATH is:

    
    
    ['', '/usr/local/lib/python2.7/dist-packages/bbfreeze-1.0.2-py2.7-linux-x86_64.egg', '/usr/local/lib/python2.7/dist-packages/altgraph-0.9-py2.7.egg', '/usr/local/lib/python2.7/dist-packages/phylonetwork-1.0b6-py2.7.egg', '/usr/local/lib/python2.7/dist-packages/tables-3.2.0-py2.7-linux-x86_64.egg', '/usr/lib/python2.7/dist-packages', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-x86_64-linux-gnu', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages/PILcompat', '/usr/lib/python2.7/dist-packages/gst-0.10', '/usr/lib/python2.7/dist-packages/gtk-2.0', '/usr/lib/pymodules/python2.7', '/usr/lib/python2.7/dist-packages/ubuntu-sso-client', '/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode']
    

What am I missing?

Any healp would be appreaciated.


Answer: Facing the same issue, I found this interesting answer : [How to solve
AttributeError when importing
igraph?](http://stackoverflow.com/questions/6315440/how-to-solve-
attributeerror-when-importing-igraph)

You should check for packages names `io` and 'N' in your own sources. Make
sure they do not overlap definition of `io` builtin packages and numpy (you
seemed to have imported `as N`)

Renaming them solved this issue for me.

