有人为python成功安装了apgl图形库吗?http://packages.python.org/apgl/ python 中是否有其他替代图形库可以与 apgl 执行相同的操作并具有相同的简单性?
目前我正在使用 Ubuntu 12.04 发行版,并且我已经在此处安装了依赖库:
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
它安装成功,然后当我这样做时:
>>> import apgl
>>> apgl.test()
我遇到错误:
>>> 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)