I have a linux (4.1.15-8) machine with SUSE (gcc version 4.8.5) and python 2.7.11 with anaconda 4.0.0 64-bit and under a variety of scenarios I can not get pandana 2.0.0 to install properly. All except for conda seem to all be a gcc error. Could it be a gcc path issue? Any thoughts on how to get around this or any plans to release 2.0.0 via conda?
1) conda install pandana
After adding the correct channel, only version 0.1.2 is available via conda. Version 0.1.2 installs fine this way.
2) pip install pandana (for pandana 2.0.0)
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/sablanchard/anaconda2/lib/python2.7/site-packages/numpy/core/include -I. -Isrc/ann_1.1.2/include -I/home/sablanchard/anaconda2/include/python2.7 -c src/accessibility.cpp -o build/temp.linux-x86_64-2.7/src/accessibility.o -w -std=c++0x -O3 -fpic -g -fopenmp
unable to execute 'gcc': No such file or directory
error: command 'gcc' failed with exit status 1
----------------------------------------
Command "/home/sablanchard/anaconda2/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-build-veqtsZ/pandana/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-yCejEP-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-veqtsZ/pandana/
3) install via the repo clone for 2.0.0 with python setup.py install
building 'pandana._pyaccess' extension
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/sablanchard/anaconda2/lib/python2.7/site-packages/numpy/core/include -I. -Isrc/ann_1.1.2/include -I/home/sablanchard/anaconda2/include/python2.7 -c src/accessibility.cpp -o build/temp.linux-x86_64-2.7/src/accessibility.o -w -std=c++0x -O3 -fpic -g -fopenmp
unable to execute 'gcc': No such file or directory
error: command 'gcc' failed with exit status 1
This all stems from an error in 0.1.2 with get_node_ids that I am assuming is fixed in 2.0.0 because this same data with the same command on another machine with 2.0.0 works fine:
blocks['node_id'] = net.get_node_ids(blocks['x'], blocks['y'])
KeyError Traceback (most recent call last)
in ()
1 t0 = time.time()
----> 2 blocks['node_id'] = net.get_node_ids(blocks['x'], blocks['y'])
3 print int(time.time()-t0), 'sec.' #
/home/sablanchard/anaconda2/lib/python2.7/site-packages/pandana-0.1.2-py2.7-linux-x86_64.egg/pandana/network.pyc in get_node_ids(self, x_col, y_col, mapping_distance)
342 # later date - need to convert from internal to external ids
343 node_ids = pd.Series(self.nodes_df.reset_index().
--> 344 iloc[s]["index"].values,
345 index=s.index)
346 return node_ids
/home/sablanchard/anaconda2/lib/python2.7/site-packages/pandas/core/frame.pyc in getitem(self, key)
1990 return self._getitem_multilevel(key)
1991 else:
-> 1992 return self._getitem_column(key)
1993
1994 def _getitem_column(self, key):
/home/sablanchard/anaconda2/lib/python2.7/site-packages/pandas/core/frame.pyc in _getitem_column(self, key)
1997 # get column
1998 if self.columns.is_unique:
-> 1999 return self._get_item_cache(key)
2000
2001 # duplicate columns & possible reduce dimensionality
/home/sablanchard/anaconda2/lib/python2.7/site-packages/pandas/core/generic.pyc in _get_item_cache(self, item)
1343 res = cache.get(item)
1344 if res is None:
-> 1345 values = self._data.get(item)
1346 res = self._box_item_values(item, values)
1347 cache[item] = res
/home/sablanchard/anaconda2/lib/python2.7/site-packages/pandas/core/internals.pyc in get(self, item, fastpath)
3223
3224 if not isnull(item):
-> 3225 loc = self.items.get_loc(item)
3226 else:
3227 indexer = np.arange(len(self.items))[isnull(self.items)]
/home/sablanchard/anaconda2/lib/python2.7/site-packages/pandas/indexes/base.pyc in get_loc(self, key, method, tolerance)
1876 return self._engine.get_loc(key)
1877 except KeyError:
-> 1878 return self._engine.get_loc(self._maybe_cast_indexer(key))
1879
1880 indexer = self.get_indexer([key], method=method, tolerance=tolerance)
pandas/index.pyx in pandas.index.IndexEngine.get_loc (pandas/index.c:4027)()
pandas/index.pyx in pandas.index.IndexEngine.get_loc (pandas/index.c:3891)()
pandas/hashtable.pyx in pandas.hashtable.PyObjectHashTable.get_item (pandas/hashtable.c:12408)()
pandas/hashtable.pyx in pandas.hashtable.PyObjectHashTable.get_item (pandas/hashtable.c:12359)()
KeyError: 'index'