Did anyone successfully install apgl graph library for python? http://packages.python.org/apgl/ Is there other alternative graph libraries in python that does the same stuff as apgl with the same simplicity?
Currently i’m using Ubuntu 12.04 distro and i’ve installed the dependent libraries here:
sudo apt-get install pip
sudo pip install numpy
sudo apt-get install libatlas-base-dev gfortran g++
sudo pip install scipy
sudo pip install matplotlib
sudo pip install agpl
It installed successfully,then when i did:
>>> import apgl
>>> apgl.test()
I encounter the error:
>>> apgl.test()
Running tests from /usr/local/lib/python2.7/dist-packages/apgl
..............s....................................................E...........E.................................................ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss.....................................................................E.........E.........................................sssssssss...sssssss..sssssssssssssssssssssssssssss.................................s....s..ss..........
======================================================================
ERROR: testLoad (graph.test.SparseGraphTest.SparseGraphTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/apgl/graph/test/MatrixGraphTest.py", line 1619, in testLoad
graph.save(tempFile)
File "/usr/local/lib/python2.7/dist-packages/apgl/graph/AbstractMatrixGraph.py", line 558, in save
import zipfile
File "/usr/lib/python2.7/zipfile.py", line 464, in <module>
class ZipExtFile(io.BufferedIOBase):
AttributeError: 'module' object has no attribute 'BufferedIOBase'
======================================================================
ERROR: testPickle (graph.test.SparseGraphTest.SparseGraphTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/apgl/graph/test/MatrixGraphTest.py", line 2309, in testPickle
output = pickle.dumps(graph)
File "/usr/lib/python2.7/pickle.py", line 1374, in dumps
Pickler(file, protocol).dump(obj)
File "/usr/lib/python2.7/pickle.py", line 224, in dump
self.save(obj)
File "/usr/lib/python2.7/pickle.py", line 306, in save
rv = reduce(self.proto)
File "/usr/lib/python2.7/copy_reg.py", line 84, in _reduce_ex
dict = getstate()
File "/usr/local/lib/python2.7/dist-packages/apgl/graph/AbstractMatrixGraph.py", line 1287, in __getstate__
self.save(tempFile.name)
File "/usr/local/lib/python2.7/dist-packages/apgl/graph/AbstractMatrixGraph.py", line 558, in save
import zipfile
File "/usr/lib/python2.7/zipfile.py", line 464, in <module>
class ZipExtFile(io.BufferedIOBase):
AttributeError: 'module' object has no attribute 'BufferedIOBase'
======================================================================
ERROR: testLoad (graph.test.DenseGraphTest.DenseGraphTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/apgl/graph/test/MatrixGraphTest.py", line 1619, in testLoad
graph.save(tempFile)
File "/usr/local/lib/python2.7/dist-packages/apgl/graph/AbstractMatrixGraph.py", line 558, in save
import zipfile
File "/usr/lib/python2.7/zipfile.py", line 464, in <module>
class ZipExtFile(io.BufferedIOBase):
AttributeError: 'module' object has no attribute 'BufferedIOBase'
======================================================================
ERROR: testPickle (graph.test.DenseGraphTest.DenseGraphTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/apgl/graph/test/MatrixGraphTest.py", line 2309, in testPickle
output = pickle.dumps(graph)
File "/usr/lib/python2.7/pickle.py", line 1374, in dumps
Pickler(file, protocol).dump(obj)
File "/usr/lib/python2.7/pickle.py", line 224, in dump
self.save(obj)
File "/usr/lib/python2.7/pickle.py", line 306, in save
rv = reduce(self.proto)
File "/usr/lib/python2.7/copy_reg.py", line 84, in _reduce_ex
dict = getstate()
File "/usr/local/lib/python2.7/dist-packages/apgl/graph/AbstractMatrixGraph.py", line 1287, in __getstate__
self.save(tempFile.name)
File "/usr/local/lib/python2.7/dist-packages/apgl/graph/AbstractMatrixGraph.py", line 558, in save
import zipfile
File "/usr/lib/python2.7/zipfile.py", line 464, in <module>
class ZipExtFile(io.BufferedIOBase):
AttributeError: 'module' object has no attribute 'BufferedIOBase'
----------------------------------------------------------------------
Ran 423 tests in 46.433s
FAILED (errors=4, skipped=120)
It seems to me you have some kind of an Ubuntu problem.
Indicates that something is wrong with your python installation.
Did you install it your self?
Plus … while pip is great, you should prefer to work with you package manager, and only if you must install really new versions or non-packaged versions you should use pip. Hence instead of installing with pip do,
And only then install apgl with pip.
I tested my installation apgl successfully on a Debian Wheezy with packages updated as of today (13-Sep-2012), and the test results are fine.