I can not get the zen library to install on a fresh install of Ubuntu 16.04.1.
sudo apt-get install git
sudo apt-get install build-essential
sudo apt-get install python-dev
sudo apt-get install virtualenv
I have used the following instructions, but have not made it very far.
git clone https://github.com/networkdynamics/zenlib.git
virtualenv --distribute zenlibenv
source zenlibenv/bin/activate
(zenlibenv) pip install cython
(zenlibenv) pip install numpy
(zenlibenv) cd zenlib/src/
(zenlibenv) python setup.py install
pip install matplotlib
pip install networkx
I then run the test again.
And I am met with the following errors.
.....................................................................................................................................................................................EE..............................................................................................................[('x', 'y', 0.1), ('y', 'z', 1.0), ('z', 'a', 1.0), ('z', 'y', 1.0)]
.............EE..E................................E..E
======================================================================
ERROR: test_self_edges (zen.tests.layout.ForceatlasTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/scott/zen/zenlibenv/local/lib/python2.7/site-packages/zen/tests/layout.py", line 22, in test_self_edges
view = layout.forceatlas(g)
File "/home/scott/zen/zenlibenv/local/lib/python2.7/site-packages/zen/layout/__init__.py", line 102, in forceatlas
return forceatlas_layout.layout(GV,**kwargs)
File "zen/layout/forceatlas_layout.pyx", line 10, in zen.layout.forceatlas_layout.layout
File "zen/layout/forceatlas_layout.pyx", line 24, in zen.layout.forceatlas_layout.layout
File "zen/layout/forceatlas_layout.pyx", line 41, in zen.layout.forceatlas_layout.run_forces
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
======================================================================
ERROR: test_simple (zen.tests.layout.ForceatlasTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/scott/zen/zenlibenv/local/lib/python2.7/site-packages/zen/tests/layout.py", line 11, in test_simple
view = layout.forceatlas(g)
File "/home/scott/zen/zenlibenv/local/lib/python2.7/site-packages/zen/layout/__init__.py", line 102, in forceatlas
return forceatlas_layout.layout(GV,**kwargs)
File "zen/layout/forceatlas_layout.pyx", line 10, in zen.layout.forceatlas_layout.layout
File "zen/layout/forceatlas_layout.pyx", line 24, in zen.layout.forceatlas_layout.layout
File "zen/layout/forceatlas_layout.pyx", line 41, in zen.layout.forceatlas_layout.run_forces
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
======================================================================
ERROR: test_mondego (zen.tests.lpa.RealNetworksLPATestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/scott/zen/zenlibenv/local/lib/python2.7/site-packages/zen/tests/lpa.py", line 14, in test_mondego
G = zen.io.edgelist.read(net_fname,directed=True)
File "zen/io/edgelist.pyx", line 121, in zen.io.edgelist.read
File "zen/io/edgelist.pyx", line 147, in zen.io.edgelist.__inner_read
Exception: Unable to open file /home/scott/zen/zenlibenv/local/lib/python2.7/site-packages/zen/tests/mondego.edgelist
======================================================================
ERROR: test_test1 (zen.tests.scn.SCNTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/scott/zen/zenlibenv/local/lib/python2.7/site-packages/zen/tests/scn.py", line 88, in test_test1
self.assertNotEqual(G.node_data_(0),None)
File "/usr/lib/python2.7/unittest/case.py", line 519, in assertNotEqual
if not first != second:
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
======================================================================
ERROR: test_write1 (zen.tests.scn.SCNTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/scott/zen/zenlibenv/local/lib/python2.7/site-packages/zen/tests/scn.py", line 128, in test_write1
edge_data_fxn=lambda idx,n1,n2,data: tuple([a for a in data]))
File "zen/io/scn.pyx", line 98, in zen.io.scn.write
File "zen/io/scn.pyx", line 102, in zen.io.scn.__inner_write
File "zen/io/scn.pyx", line 202, in zen.io.scn.write_digraph_scn
File "/home/scott/zen/zenlibenv/local/lib/python2.7/site-packages/zen/tests/scn.py", line 127, in <lambda>
node_data_fxn=lambda idx,nobj,data: None if data == None else tuple([a for a in data]),
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
======================================================================
ERROR: test_test1 (zen.tests.scn.UndirectedSCNTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/scott/zen/zenlibenv/local/lib/python2.7/site-packages/zen/tests/scn.py", line 14, in test_test1
self.assertNotEqual(G.node_data_(0),None)
File "/usr/lib/python2.7/unittest/case.py", line 519, in assertNotEqual
if not first != second:
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
======================================================================
ERROR: test_write1 (zen.tests.scn.UndirectedSCNTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/scott/zen/zenlibenv/local/lib/python2.7/site-packages/zen/tests/scn.py", line 54, in test_write1
edge_data_fxn=lambda idx,n1,n2,data: tuple([a for a in data]))
File "zen/io/scn.pyx", line 98, in zen.io.scn.write
File "zen/io/scn.pyx", line 104, in zen.io.scn.__inner_write
File "zen/io/scn.pyx", line 123, in zen.io.scn.write_graph_scn
File "/home/scott/zen/zenlibenv/local/lib/python2.7/site-packages/zen/tests/scn.py", line 53, in <lambda>
node_data_fxn=lambda idx,nobj,data: None if data == None else tuple([a for a in data]),
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
----------------------------------------------------------------------
Ran 347 tests in 12.371s
FAILED (errors=7)
python version is 2.7.12
virtualenv version is 15.0.1
numpy version is 1.13.1
cython version is 0.27
matlabplot version is 2.0.2
networkx version is 2.0
Hi,
I can not get the zen library to install on a fresh install of Ubuntu 16.04.1.
I have used the following instructions, but have not made it very far.
I then test the install with
python -m zen.testAnd receive the following following message
So I run
I then run the test again.
python -m zen.testAnd I am met with the following errors.
Software Versions
Any help will be greatly appreciated!