Closed sablanchard closed 9 years ago
There hasn't been a release of Pandana since we added the OSM loader, so you won't find it on PyPI or anaconda.org. It's only here on GitHub.
I've very little experience compiling C extensions on Windows. The /w
and /openmp
are supposed to be interpreted as compiler options, but it looks like they are being interpreted as paths instead. I wonder if they should be -w
and --openmp
. You could try opening up the setup.py and changing those to see what happens.
Thanks that explains conda.
I edited setup.py and made those changes. Different error now for _pyaccess this time with src/accessibility:
I wonder if openmp is not supported on your system. Try removing the --openmp
from the windows compile args in setup.py.
Ok I made the change here is the error:
C:\Users\Work\Downloads\pandana-master\pandana-master>python setup.py install
c:\anaconda\lib\site-packages\setuptools-18.4-py2.7.egg\setuptools\dist.py:285: UserWarning: Normalizing '0.2dev' to '0.2.dev0'
running install
running bdist_egg
running egg_info
writing requirements to pandana.egg-info\requires.txt
writing pandana.egg-info\PKG-INFO
writing top-level names to pandana.egg-info\top_level.txt
writing dependency_links to pandana.egg-info\dependency_links.txt
reading manifest file 'pandana.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'pandana.egg-info\SOURCES.txt'
installing library code to build\bdist.win-amd64\egg
running install_lib
running build_py
running build_ext
building 'pandana._pyaccess' extension
C:\Anaconda\Scripts\gcc.bat -DMS_WIN64 -mdll -O -Wall -IC:\Anaconda\lib\site-packages\numpy\core\include -I. -Isrc/ann_1.1.2/include
-IC:\Anaconda\include -IC:\Anaconda\PC -c src/accessibility.cpp -o build\temp.win-amd64-2.7\Release\src\accessibility.o -w
In file included from src/contraction_hierarchies/src/Contractor/Contractor.h:30:0,
from src/contraction_hierarchies/src/Contractor/ContractionCleanup.h:34,
from src/contraction_hierarchies/src/libch.h:30,
from src/graphalg.h:6,
from src/accessibility.h:8,
from src/accessibility.cpp:1:
src/contraction_hierarchies/src/Contractor/../DataStructures/BinaryHeap.h: In member function 'const Key& UnorderedMapStorage<NodeID
, Key>::operator[](NodeID) const':
src/contraction_hierarchies/src/Contractor/../DataStructures/BinaryHeap.h:80:14: error: 'iter' does not name a type
src/contraction_hierarchies/src/Contractor/../DataStructures/BinaryHeap.h:81:16: error: 'iter' was not declared in this scope
src/contraction_hierarchies/src/Contractor/../DataStructures/BinaryHeap.h: At global scope:
src/contraction_hierarchies/src/Contractor/../DataStructures/BinaryHeap.h:95:62: error: spurious '>>', use '>' to terminate a templa
te argument list
src/contraction_hierarchies/src/Contractor/../DataStructures/BinaryHeap.h:97:1: error: definition of 'class BinaryHeap' inside templ
ate parameter list
src/contraction_hierarchies/src/Contractor/../DataStructures/BinaryHeap.h:290:1: error: two or more data types in declaration of 'ty
pe name'
src/contraction_hierarchies/src/Contractor/../DataStructures/BinaryHeap.h:290:2: error: expected '>' before ';' token
src/contraction_hierarchies/src/Contractor/../DataStructures/BinaryHeap.h:290:2: error: expected unqualified-id before ';' token
In file included from src/contraction_hierarchies/src/Contractor/ContractionCleanup.h:34:0,
from src/contraction_hierarchies/src/libch.h:30,
from src/graphalg.h:6,
from src/accessibility.h:8,
from src/accessibility.cpp:1:
src/contraction_hierarchies/src/Contractor/Contractor.h:71:13: error: 'BinaryHeap' does not name a type
src/contraction_hierarchies/src/Contractor/Contractor.h:75:9: error: '_Heap' does not name a type
src/contraction_hierarchies/src/Contractor/Contractor.h: In constructor 'Contractor::_ThreadData::_ThreadData(NodeID)':
src/contraction_hierarchies/src/Contractor/Contractor.h:77:38: error: class 'Contractor::_ThreadData' does not have any field named
'heap'
In file included from src/contraction_hierarchies/src/Contractor/ContractionCleanup.h:34:0,
from src/contraction_hierarchies/src/libch.h:30,
from src/graphalg.h:6,
from src/accessibility.h:8,
from src/accessibility.cpp:1:
src/contraction_hierarchies/src/Contractor/Contractor.h: In member function 'void Contractor::_Dijkstra(NodeID, int, unsigned int, C
ontractor::_ThreadData*)':
src/contraction_hierarchies/src/Contractor/Contractor.h:375:9: error: '_Heap' was not declared in this scope
src/contraction_hierarchies/src/Contractor/Contractor.h:375:16: error: 'heap' was not declared in this scope
src/contraction_hierarchies/src/Contractor/Contractor.h:375:29: error: 'struct Contractor::_ThreadData' has no member named 'heap'
src/contraction_hierarchies/src/Contractor/Contractor.h: In member function 'bool Contractor::_Contract(Contractor::_ThreadData*, No
deID, Contractor::_ContractionInformation*)':
src/contraction_hierarchies/src/Contractor/Contractor.h:449:9: error: '_Heap' was not declared in this scope
src/contraction_hierarchies/src/Contractor/Contractor.h:449:16: error: 'heap' was not declared in this scope
src/contraction_hierarchies/src/Contractor/Contractor.h:449:29: error: 'struct Contractor::_ThreadData' has no member named 'heap'
In file included from src/contraction_hierarchies/src/libch.h:30:0,
from src/graphalg.h:6,
from src/accessibility.h:8,
from src/accessibility.cpp:1:
src/contraction_hierarchies/src/Contractor/ContractionCleanup.h: At global scope:
src/contraction_hierarchies/src/Contractor/ContractionCleanup.h:52:13: error: 'BinaryHeap' does not name a type
src/contraction_hierarchies/src/Contractor/ContractionCleanup.h:55:9: error: '_Heap' does not name a type
src/contraction_hierarchies/src/Contractor/ContractionCleanup.h:56:9: error: '_Heap' does not name a type
In file included from src/contraction_hierarchies/src/libch.h:30:0,
from src/graphalg.h:6,
from src/accessibility.h:8,
from src/accessibility.cpp:1:
src/contraction_hierarchies/src/Contractor/ContractionCleanup.h:249:78: error: '_Heap' has not been declared
src/contraction_hierarchies/src/Contractor/ContractionCleanup.h:249:98: error: '_Heap' has not been declared
In file included from src/contraction_hierarchies/src/libch.h:30:0,
from src/graphalg.h:6,
from src/accessibility.h:8,
from src/accessibility.cpp:1:
src/contraction_hierarchies/src/Contractor/ContractionCleanup.h: In constructor 'ContractionCleanup::_ThreadData::_ThreadData(NodeID
)':
src/contraction_hierarchies/src/Contractor/ContractionCleanup.h:58:13: error: '_heapBackward' was not declared in this scope
src/contraction_hierarchies/src/Contractor/ContractionCleanup.h:58:33: error: expected type-specifier before '_Heap'
src/contraction_hierarchies/src/Contractor/ContractionCleanup.h:58:33: error: expected ';' before '_Heap'
src/contraction_hierarchies/src/Contractor/ContractionCleanup.h:59:13: error: '_heapForward' was not declared in this scope
src/contraction_hierarchies/src/Contractor/ContractionCleanup.h:59:32: error: expected type-specifier before '_Heap'
src/contraction_hierarchies/src/Contractor/ContractionCleanup.h:59:32: error: expected ';' before '_Heap'
src/contraction_hierarchies/src/Contractor/ContractionCleanup.h: In destructor 'ContractionCleanup::_ThreadData::~_ThreadData()':
src/contraction_hierarchies/src/Contractor/ContractionCleanup.h:63:20: error: '_heapBackward' was not declared in this scope
src/contraction_hierarchies/src/Contractor/ContractionCleanup.h:64:20: error: '_heapForward' was not declared in this scope
In file included from src/contraction_hierarchies/src/libch.h:30:0,
from src/graphalg.h:6,
from src/accessibility.h:8,
from src/accessibility.cpp:1:
src/contraction_hierarchies/src/Contractor/ContractionCleanup.h: In member function 'void ContractionCleanup::_ComputeStep(int*, int
*, const EdgeAllowed&, const StallEdgeAllowed&, NodeID*, int*)':
src/contraction_hierarchies/src/Contractor/ContractionCleanup.h:251:42: error: request for member 'DeleteMin' in 'heapForward->', wh
ich is of non-class type 'int'
src/contraction_hierarchies/src/Contractor/ContractionCleanup.h:252:43: error: request for member 'GetKey' in 'heapForward->', which
is of non-class type 'int'
src/contraction_hierarchies/src/Contractor/ContractionCleanup.h:254:28: error: request for member 'WasInserted' in 'heapBackward->',
which is of non-class type 'int'
src/contraction_hierarchies/src/Contractor/ContractionCleanup.h:255:51: error: request for member 'GetKey' in 'heapBackward->', whic
h is of non-class type 'int'
src/contraction_hierarchies/src/Contractor/ContractionCleanup.h:263:26: error: request for member 'DeleteAll' in 'heapForward->', wh
ich is of non-class type 'int'
src/contraction_hierarchies/src/Contractor/ContractionCleanup.h:274:36: error: request for member 'WasInserted' in 'heapForward->',
which is of non-class type 'int'
src/contraction_hierarchies/src/Contractor/ContractionCleanup.h:275:34: error: request for member 'Insert' in 'heapForward->', which
is of non-class type 'int'
src/contraction_hierarchies/src/Contractor/ContractionCleanup.h:278:53: error: request for member 'GetKey' in 'heapForward->', which
is of non-class type 'int'
src/contraction_hierarchies/src/Contractor/ContractionCleanup.h:279:34: error: request for member 'DecreaseKey' in 'heapForward->',
which is of non-class type 'int'
src/contraction_hierarchies/src/Contractor/ContractionCleanup.h:281:34: error: request for member 'GetData' in 'heapForward->', whic
h is of non-class type 'int'
src/contraction_hierarchies/src/Contractor/ContractionCleanup.h: In member function 'int ContractionCleanup::_ComputeDistance(NodeID
, NodeID, ContractionCleanup::_ThreadData*, std::vector<unsigned int>*)':
src/contraction_hierarchies/src/Contractor/ContractionCleanup.h:288:15: error: 'struct ContractionCleanup::_ThreadData' has no membe
r named '_heapForward'
src/contraction_hierarchies/src/Contractor/ContractionCleanup.h:289:15: error: 'struct ContractionCleanup::_ThreadData' has no membe
r named '_heapBackward'
src/contraction_hierarchies/src/Contractor/ContractionCleanup.h:291:15: error: 'struct ContractionCleanup::_ThreadData' has no membe
r named '_heapForward'
src/contraction_hierarchies/src/Contractor/ContractionCleanup.h:292:15: error: 'struct ContractionCleanup::_ThreadData' has no membe
r named '_heapBackward'
src/contraction_hierarchies/src/Contractor/ContractionCleanup.h:299:23: error: 'struct ContractionCleanup::_ThreadData' has no membe
r named '_heapForward'
src/contraction_hierarchies/src/Contractor/ContractionCleanup.h:299:52: error: 'struct ContractionCleanup::_ThreadData' has no membe
r named '_heapBackward'
src/contraction_hierarchies/src/Contractor/ContractionCleanup.h:301:24: error: 'struct ContractionCleanup::_ThreadData' has no membe
r named '_heapForward'
src/contraction_hierarchies/src/Contractor/ContractionCleanup.h:302:37: error: 'struct ContractionCleanup::_ThreadData' has no membe
r named '_heapForward'
src/contraction_hierarchies/src/Contractor/ContractionCleanup.h:302:57: error: 'struct ContractionCleanup::_ThreadData' has no membe
r named '_heapBackward'
src/contraction_hierarchies/src/Contractor/ContractionCleanup.h:305:24: error: 'struct ContractionCleanup::_ThreadData' has no membe
r named '_heapBackward'
src/contraction_hierarchies/src/Contractor/ContractionCleanup.h:306:37: error: 'struct ContractionCleanup::_ThreadData' has no membe
r named '_heapBackward'
src/contraction_hierarchies/src/Contractor/ContractionCleanup.h:306:58: error: 'struct ContractionCleanup::_ThreadData' has no membe
r named '_heapForward'
In file included from src/contraction_hierarchies/src/libch.h:34:0,
from src/graphalg.h:6,
from src/accessibility.h:8,
from src/accessibility.cpp:1:
src/contraction_hierarchies/src/POIIndex/POIIndex.h: At global scope:
src/contraction_hierarchies/src/POIIndex/POIIndex.h:59:13: error: 'BinaryHeap' does not name a type
In file included from src/contraction_hierarchies/src/libch.h:34:0,
from src/graphalg.h:6,
from src/accessibility.h:8,
from src/accessibility.cpp:1:
src/contraction_hierarchies/src/POIIndex/POIIndex.h:277:13: error: 'POIHeap' does not name a type
src/contraction_hierarchies/src/POIIndex/POIIndex.h:278:13: error: 'POIHeap' does not name a type
src/contraction_hierarchies/src/POIIndex/POIIndex.h:285:9: error: 'tr1' in namespace 'std' does not name a type
src/contraction_hierarchies/src/POIIndex/POIIndex.h:286:21: error: 'tr1' is not a member of 'std'
src/contraction_hierarchies/src/POIIndex/POIIndex.h:286:21: error: 'tr1' is not a member of 'std'
src/contraction_hierarchies/src/POIIndex/POIIndex.h:286:50: error: template argument 1 is invalid
src/contraction_hierarchies/src/POIIndex/POIIndex.h:286:50: error: template argument 2 is invalid
src/contraction_hierarchies/src/POIIndex/POIIndex.h: In member function 'void CH::POIIndex<QueryGraphT>::addPOIToIndex(NodeID)':
src/contraction_hierarchies/src/POIIndex/POIIndex.h:82:13: error: 'additionHeap' was not declared in this scope
src/contraction_hierarchies/src/POIIndex/POIIndex.h: In member function 'void CH::POIIndex<QueryGraphT>::getNearestPOIs(NodeID, std:
:vector<CH::BucketEntry>&, unsigned int, unsigned int, unsigned int)':
src/contraction_hierarchies/src/POIIndex/POIIndex.h:173:13: error: 'POIHeap' was not declared in this scope
src/contraction_hierarchies/src/POIIndex/POIIndex.h:173:23: error: 'resultHeap' was not declared in this scope
src/contraction_hierarchies/src/POIIndex/POIIndex.h:173:60: error: invalid types 'int[unsigned int]' for array subscript
src/contraction_hierarchies/src/POIIndex/POIIndex.h:174:23: error: 'queryHeap' was not declared in this scope
src/contraction_hierarchies/src/POIIndex/POIIndex.h:174:59: error: invalid types 'int[unsigned int]' for array subscript
src/contraction_hierarchies/src/POIIndex/POIIndex.h: In member function 'void CH::POIIndex<QueryGraphT>::Initialize()':
src/contraction_hierarchies/src/POIIndex/POIIndex.h:265:13: error: 'additionHeap' was not declared in this scope
src/contraction_hierarchies/src/POIIndex/POIIndex.h:265:36: error: expected type-specifier before 'POIHeap'
src/contraction_hierarchies/src/POIIndex/POIIndex.h:265:36: error: expected ')' before 'POIHeap'
src/contraction_hierarchies/src/POIIndex/POIIndex.h:269:33: error: request for member 'push_back' in '((CH::POIIndex<QueryGraphT>*)t
his)->CH::POIIndex<QueryGraphT>::threadDataArray', which is of non-class type 'int'
src/contraction_hierarchies/src/POIIndex/POIIndex.h:269:48: error: 'std::tr1' has not been declared
src/contraction_hierarchies/src/POIIndex/POIIndex.h:269:70: error: expected primary-expression before '>' token
src/contraction_hierarchies/src/POIIndex/POIIndex.h: In constructor 'CH::POIIndex<QueryGraphT>::_ThreadData::_ThreadData(unsigned in
t)':
src/contraction_hierarchies/src/POIIndex/POIIndex.h:276:41: error: class 'CH::POIIndex<QueryGraphT>::_ThreadData' does not have any
field named 'queryHeap'
src/contraction_hierarchies/src/POIIndex/POIIndex.h:276:58: error: class 'CH::POIIndex<QueryGraphT>::_ThreadData' does not have any
field named 'resultHeap'
In file included from src/graphalg.h:6:0,
from src/accessibility.h:8,
from src/accessibility.cpp:1:
src/contraction_hierarchies/src/libch.h: At global scope:
src/contraction_hierarchies/src/libch.h:41:9: error: 'BinaryHeap' does not name a type
src/contraction_hierarchies/src/libch.h:46:52: error: 'Heap' was not declared in this scope
src/contraction_hierarchies/src/libch.h:46:56: error: template argument 3 is invalid
src/contraction_hierarchies/src/libch.h:46:58: error: template argument 1 is invalid
src/contraction_hierarchies/src/libch.h:46:58: error: template argument 2 is invalid
src/contraction_hierarchies/src/libch.h:46:77: error: invalid type in declaration before ';' token
In file included from src/graphalg.h:6:0,
from src/accessibility.h:8,
from src/accessibility.cpp:1:
src/contraction_hierarchies/src/libch.h:144:46: error: 'Heap' was not declared in this scope
src/contraction_hierarchies/src/libch.h:144:50: error: template argument 3 is invalid
src/contraction_hierarchies/src/libch.h:144:53: error: template argument 1 is invalid
src/contraction_hierarchies/src/libch.h:144:53: error: template argument 2 is invalid
In file included from src/accessibility.cpp:1:0:
src/accessibility.h:99:16: error: 'tr1' is not a member of 'std'
src/accessibility.h:99:16: error: 'tr1' is not a member of 'std'
src/accessibility.h:99:42: error: template argument 1 is invalid
src/accessibility.h:99:42: error: template argument 2 is invalid
src/accessibility.cpp: In member function 'double MTC::accessibility::Accessibility::compute_centrality(int, MTC::accessibility::Dis
tanceVec&, int)':
src/accessibility.cpp:22:39: error: invalid types 'int[int]' for array subscript
src/accessibility.cpp: In member function 'void MTC::accessibility::Accessibility::initializePOIs(int, double, int)':
src/accessibility.cpp:38:36: error: request for member 'size' in '((MTC::accessibility::Accessibility*)this)->MTC::accessibility::Ac
cessibility::ga', which is of non-class type 'int'
src/accessibility.cpp:39:12: error: invalid types 'int[int]' for array subscript
src/accessibility.cpp: In member function 'void MTC::accessibility::Accessibility::initializeCategory(int, MTC::accessibility::acces
sibility_vars_t&)':
src/accessibility.cpp:54:29: error: request for member 'size' in '((MTC::accessibility::Accessibility*)this)->MTC::accessibility::Ac
cessibility::ga', which is of non-class type 'int'
src/accessibility.cpp:55:14: error: invalid types 'int[int]' for array subscript
src/accessibility.cpp: In member function 'std::vector<float> MTC::accessibility::Accessibility::findNearestPOIs(int, float, unsigne
d int, unsigned int, int)':
src/accessibility.cpp:75:4: error: 'POI_MAXVAL' was not declared in this scope
src/accessibility.cpp:77:34: error: invalid types 'int[int]' for array subscript
src/accessibility.cpp: In member function 'void MTC::accessibility::Accessibility::precomputeRangeQueries(float)':
src/accessibility.cpp:122:18: error: request for member 'size' in '((MTC::accessibility::Accessibility*)this)->MTC::accessibility::A
ccessibility::ga', which is of non-class type 'int'
src/accessibility.cpp:123:27: error: request for member 'size' in '((MTC::accessibility::Accessibility*)this)->MTC::accessibility::A
ccessibility::ga', which is of non-class type 'int'
src/accessibility.cpp:131:40: error: request for member 'size' in '((MTC::accessibility::Accessibility*)this)->MTC::accessibility::A
ccessibility::ga', which is of non-class type 'int'
src/accessibility.cpp:132:13: error: invalid types 'int[int]' for array subscript
src/accessibility.cpp: In member function 'MTC::accessibility::DistanceVec MTC::accessibility::Accessibility::Range(int, float, int)
':
src/accessibility.cpp:170:11: error: invalid types 'int[int]' for array subscript
src/accessibility.cpp: In member function 'double MTC::accessibility::Accessibility::aggregateAccessibilityVariable(int, float, MTC:
:accessibility::accessibility_vars_t&, MTC::accessibility::aggregation_types_t, MTC::accessibility::decay_func_t, int)':
src/accessibility.cpp:193:11: error: invalid types 'int[int]' for array subscript
src/accessibility.cpp: In member function 'double MTC::accessibility::Accessibility::modelResult(int, float, int, int*, float*, floa
t, float, float, float, float, int)':
src/accessibility.cpp:278:11: error: invalid types 'int[int]' for array subscript
error: command 'C:\\Anaconda\\Scripts\\gcc.bat' failed with exit status 1
Okay I think we are getting into the vagaries of compilation on Windows, about which I know nothing. I have always followed these instructions for building the Pandana binaries that are on PyPI and anaconda.org. If you do follow those you will probably need to undo the changes to setup.py that we made to get this far.
I will see about getting a new release with binary builds out in the next couple weeks.
A final option is to use a Mac or Linux if you have access, those in my experience are much easier.
Thanks ok in the meantime I can do that. Long term it would be good have the windows binarys. This issue can be closed after those are pushed out. Can you reply to this thread once they are out? I can test it.
Sounds good.
I've released Pandana 0.2.0 and made Windows binaries you can install via pip, e.g. pip install pandana
. I haven't been able to make conda packages because of a problem with conda on Windows.
Cool - this has the quantile stuff in it?
It's master as of today, so I think it should?
Awesome.
Thanks for the update. I can confirm that my issue has been fixed.
Excellent, thanks!
I am running 64-bit Windows 8.1 with python 2.7 and have installed pandana 0.1.2 with the following code:
conda config --add channels synthicity conda install pandana
pandana imports fine with:
import pandana
but it seems the loader scripts were not installed correctly. I get the following error running:
from pandana.loaders import osm ImportError: No module named loaders
Checking the pandana package directory in anaconda: C:\Anaconda\pkgs\pandana-0.1.2-py27_0 there are no loader subfolder or scripts.
As a work around, I tried installing pandana via the github zipfile and installation gets hung up when building _pyaccess. See below:
Any ideas on the issue or potential solutions?