Comments (5)
Hi @rafapereirabr, it looks like the build errors may be due to the windows installation of spatial package dependencies required for osmnet
such as fiona
and gdal
. I would suggest to install osmnet
first before pandana
and install the wheels for your version of windows for fiona
and gdal
if you have not already done so following these instructions: https://udst.github.io/osmnet/installation.html. Additionally, if you wish to have the latest version of pandana for windows with python 2.7, use pip install pandana
instead of conda install pandana
as the build for python 2.7 for windows on conda is only up to 0.3.0
right now.
Please let us know if you solve the issue and any steps you took to fix if they differ from these instructions.
from pandana.
Hi Sam. Thanks for your help.
I've followed your recommendation and I've installed fiona
and gdal
wheels first, then osmnet
and only then I tried to install pandana
.
I pasted the full error report below, and this line seems to give a clue Running setup.py bdist_wheel for pandana ... error
.
(C:\Users\rafa\AppData\Local\conda\conda\envs\my_root) C:\Users\rafa\Downloads>pip install pandana
Collecting pandana
Using cached pandana-0.4.0.1.zip
Requirement already satisfied: matplotlib>=1.3.1 in c:\users\rafa\appdata\local\conda\conda\envs\my_root\lib\site-packages (from pandana)
Requirement already satisfied: numpy>=1.8.0 in c:\users\rafa\appdata\local\conda\conda\envs\my_root\lib\site-packages (from pandana)
Requirement already satisfied: pandas>=0.17.0 in c:\users\rafa\appdata\local\conda\conda\envs\my_root\lib\site-packages (from pandana)
Requirement already satisfied: requests>=2.0 in c:\users\rafa\appdata\local\conda\conda\envs\my_root\lib\site-packages (from pandana)
Requirement already satisfied: tables>=3.1.0 in c:\users\rafa\appdata\local\conda\conda\envs\my_root\lib\site-packages (from pandana)
Requirement already satisfied: osmnet>=0.1.2 in c:\users\rafa\appdata\local\conda\conda\envs\my_root\lib\site-packages (from pandana)
Requirement already satisfied: cython>=0.25.2 in c:\users\rafa\appdata\local\conda\conda\envs\my_root\lib\site-packages (from pandana)
Requirement already satisfied: scikit-learn>=0.18.1 in c:\users\rafa\appdata\local\conda\conda\envs\my_root\lib\site-packages (from pandana)
Requirement already satisfied: python-dateutil>=2.0 in c:\users\rafa\appdata\local\conda\conda\envs\my_root\lib\site-packages (from matplotlib>=1.3.1->pandana)
Requirement already satisfied: backports.functools-lru-cache in c:\users\rafa\appdata\local\conda\conda\envs\my_root\lib\site-packages (from matplotlib>=1.3.1->pandana)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in c:\users\rafa\appdata\local\conda\conda\envs\my_root\lib\site-packages (from matplotlib>=1.3.1->pandana)
Requirement already satisfied: cycler>=0.10 in c:\users\rafa\appdata\local\conda\conda\envs\my_root\lib\site-packages (from matplotlib>=1.3.1->pandana)
Requirement already satisfied: six>=1.10 in c:\users\rafa\appdata\local\conda\conda\envs\my_root\lib\site-packages (from matplotlib>=1.3.1->pandana)
Requirement already satisfied: pytz in c:\users\rafa\appdata\local\conda\conda\envs\my_root\lib\site-packages (from matplotlib>=1.3.1->pandana)
Requirement already satisfied: urllib3<1.23,>=1.21.1 in c:\users\rafa\appdata\local\conda\conda\envs\my_root\lib\site-packages (from requests>=2.0->pandana)
Requirement already satisfied: idna<2.7,>=2.5 in c:\users\rafa\appdata\local\conda\conda\envs\my_root\lib\site-packages (from requests>=2.0->pandana)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in c:\users\rafa\appdata\local\conda\conda\envs\my_root\lib\site-packages (from requests>=2.0->pandana)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\rafa\appdata\local\conda\conda\envs\my_root\lib\site-packages (from requests>=2.0->pandana)
Requirement already satisfied: numexpr>=2.5.2 in c:\users\rafa\appdata\local\conda\conda\envs\my_root\lib\site-packages (from tables>=3.1.0->pandana)
Requirement already satisfied: geopandas>=0.2.1 in c:\users\rafa\appdata\local\conda\conda\envs\my_root\lib\site-packages (from osmnet>=0.1.2->pandana)
Requirement already satisfied: Shapely>=1.5 in c:\users\rafa\appdata\local\conda\conda\envs\my_root\lib\site-packages (from osmnet>=0.1.2->pandana)
Requirement already satisfied: fiona in c:\users\rafa\appdata\local\conda\conda\envs\my_root\lib\site-packages (from geopandas>=0.2.1->osmnet>=0.1.2->pandana)
Requirement already satisfied: descartes in c:\users\rafa\appdata\local\conda\conda\envs\my_root\lib\site-packages (from geopandas>=0.2.1->osmnet>=0.1.2->pandana)
Requirement already satisfied: pyproj in c:\users\rafa\appdata\local\conda\conda\envs\my_root\lib\site-packages (from geopandas>=0.2.1->osmnet>=0.1.2->pandana)
Requirement already satisfied: click-plugins in c:\users\rafa\appdata\local\conda\conda\envs\my_root\lib\site-packages (from fiona->geopandas>=0.2.1->osmnet>=0.1.2->pandana)
Requirement already satisfied: munch in c:\users\rafa\appdata\local\conda\conda\envs\my_root\lib\site-packages (from fiona->geopandas>=0.2.1->osmnet>=0.1.2->pandana)
Requirement already satisfied: enum34 in c:\users\rafa\appdata\local\conda\conda\envs\my_root\lib\site-packages (from fiona->geopandas>=0.2.1->osmnet>=0.1.2->pandana)
Requirement already satisfied: cligj in c:\users\rafa\appdata\local\conda\conda\envs\my_root\lib\site-packages (from fiona->geopandas>=0.2.1->osmnet>=0.1.2->pandana)
Requirement already satisfied: click>=3.0 in c:\users\rafa\appdata\local\conda\conda\envs\my_root\lib\site-packages (from click-plugins->fiona->geopandas>=0.2.1->osmnet>=0.1.2->pandana)
Building wheels for collected packages: pandana
Running setup.py bdist_wheel for pandana ... error
Complete output from command C:\Users\rafa\AppData\Local\conda\conda\envs\my_root\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\rafa\\appdata\\local\\temp\\pip-build-2d6cr7\\pandana\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d c:\users\rafa\appdata\local\temp\tmpsk42kjpip-wheel- --python-tag cp27:
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-2.7
creating build\lib.win-amd64-2.7\pandana
copying pandana\network.py -> build\lib.win-amd64-2.7\pandana
copying pandana\testing.py -> build\lib.win-amd64-2.7\pandana
copying pandana\utils.py -> build\lib.win-amd64-2.7\pandana
copying pandana\__init__.py -> build\lib.win-amd64-2.7\pandana
creating build\lib.win-amd64-2.7\pandana\loaders
copying pandana\loaders\osm.py -> build\lib.win-amd64-2.7\pandana\loaders
copying pandana\loaders\pandash5.py -> build\lib.win-amd64-2.7\pandana\loaders
copying pandana\loaders\__init__.py -> build\lib.win-amd64-2.7\pandana\loaders
running build_ext
skipping 'src\cyaccess.cpp' Cython extension (up-to-date)
building 'pandana.cyaccess' extension
creating build\temp.win-amd64-2.7
creating build\temp.win-amd64-2.7\Release
creating build\temp.win-amd64-2.7\Release\src
creating build\temp.win-amd64-2.7\Release\src\contraction_hierarchies
creating build\temp.win-amd64-2.7\Release\src\contraction_hierarchies\src
C:\Users\rafa\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -I. -IC:\Users\rafa\AppData\Local\conda\conda\envs\my_root\include -IC:\Users\rafa\AppData\Local\conda\conda\envs\my_root\PC -IC:\Users\rafa\AppData\Local\conda\conda\envs\my_root\lib\site-packages\numpy\core\include /Tpsrc/accessibility.cpp /Fobuild\temp.win-amd64-2.7\Release\src/accessibility.obj /w /openmp
cl : Command line warning D9025 : overriding '/W3' with '/w'
accessibility.cpp
C:\Users\rafa\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Include\xlocale(342) : warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc
c:\users\rafa\appdata\local\temp\pip-build-2d6cr7\pandana\src\accessibility.h(60) : error C2059: syntax error : '{'
c:\users\rafa\appdata\local\temp\pip-build-2d6cr7\pandana\src\accessibility.h(60) : error C2334: unexpected token(s) preceding '{'; skipping apparent function body
c:\users\rafa\appdata\local\temp\pip-build-2d6cr7\pandana\src\accessibility.h(73) : error C2059: syntax error : '{'
c:\users\rafa\appdata\local\temp\pip-build-2d6cr7\pandana\src\accessibility.h(73) : error C2334: unexpected token(s) preceding '{'; skipping apparent function body
src/accessibility.cpp(125) : error C2039: 'at' : is not a member of 'std::map<_Kty,_Ty>'
with
[
_Kty=std::string,
_Ty=MTC::accessibility::Accessibility::accessibility_vars_t
]
src/accessibility.cpp(213) : error C2065: 'aggregations' : undeclared identifier
src/accessibility.cpp(213) : error C2228: left of '.begin' must have class/struct/union
type is ''unknown-type''
src/accessibility.cpp(213) : error C2065: 'aggregations' : undeclared identifier
src/accessibility.cpp(213) : error C2228: left of '.end' must have class/struct/union
type is ''unknown-type''
src/accessibility.cpp(214) : error C2065: 'aggregations' : undeclared identifier
src/accessibility.cpp(214) : error C2228: left of '.end' must have class/struct/union
type is ''unknown-type''
src/accessibility.cpp(215) : error C2065: 'decays' : undeclared identifier
src/accessibility.cpp(215) : error C2228: left of '.begin' must have class/struct/union
type is ''unknown-type''
src/accessibility.cpp(215) : error C2065: 'decays' : undeclared identifier
src/accessibility.cpp(215) : error C2228: left of '.end' must have class/struct/union
type is ''unknown-type''
src/accessibility.cpp(215) : error C2065: 'decays' : undeclared identifier
src/accessibility.cpp(215) : error C2228: left of '.end' must have class/struct/union
type is ''unknown-type''
error: command 'C:\\Users\\rafa\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\amd64\\cl.exe' failed with exit status 2
----------------------------------------
Failed building wheel for pandana
Running setup.py clean for pandana
Failed to build pandana
Installing collected packages: pandana
Running setup.py install for pandana ... error
Complete output from command C:\Users\rafa\AppData\Local\conda\conda\envs\my_root\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\rafa\\appdata\\local\\temp\\pip-build-2d6cr7\\pandana\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record c:\users\rafa\appdata\local\temp\pip-7ptrkh-record\install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build\lib.win-amd64-2.7
creating build\lib.win-amd64-2.7\pandana
copying pandana\network.py -> build\lib.win-amd64-2.7\pandana
copying pandana\testing.py -> build\lib.win-amd64-2.7\pandana
copying pandana\utils.py -> build\lib.win-amd64-2.7\pandana
copying pandana\__init__.py -> build\lib.win-amd64-2.7\pandana
creating build\lib.win-amd64-2.7\pandana\loaders
copying pandana\loaders\osm.py -> build\lib.win-amd64-2.7\pandana\loaders
copying pandana\loaders\pandash5.py -> build\lib.win-amd64-2.7\pandana\loaders
copying pandana\loaders\__init__.py -> build\lib.win-amd64-2.7\pandana\loaders
running build_ext
skipping 'src\cyaccess.cpp' Cython extension (up-to-date)
building 'pandana.cyaccess' extension
creating build\temp.win-amd64-2.7
creating build\temp.win-amd64-2.7\Release
creating build\temp.win-amd64-2.7\Release\src
creating build\temp.win-amd64-2.7\Release\src\contraction_hierarchies
creating build\temp.win-amd64-2.7\Release\src\contraction_hierarchies\src
C:\Users\rafa\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -I. -IC:\Users\rafa\AppData\Local\conda\conda\envs\my_root\include -IC:\Users\rafa\AppData\Local\conda\conda\envs\my_root\PC -IC:\Users\rafa\AppData\Local\conda\conda\envs\my_root\lib\site-packages\numpy\core\include /Tpsrc/accessibility.cpp /Fobuild\temp.win-amd64-2.7\Release\src/accessibility.obj /w /openmp
cl : Command line warning D9025 : overriding '/W3' with '/w'
accessibility.cpp
C:\Users\rafa\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Include\xlocale(342) : warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc
c:\users\rafa\appdata\local\temp\pip-build-2d6cr7\pandana\src\accessibility.h(60) : error C2059: syntax error : '{'
c:\users\rafa\appdata\local\temp\pip-build-2d6cr7\pandana\src\accessibility.h(60) : error C2334: unexpected token(s) preceding '{'; skipping apparent function body
c:\users\rafa\appdata\local\temp\pip-build-2d6cr7\pandana\src\accessibility.h(73) : error C2059: syntax error : '{'
c:\users\rafa\appdata\local\temp\pip-build-2d6cr7\pandana\src\accessibility.h(73) : error C2334: unexpected token(s) preceding '{'; skipping apparent function body
src/accessibility.cpp(125) : error C2039: 'at' : is not a member of 'std::map<_Kty,_Ty>'
with
[
_Kty=std::string,
_Ty=MTC::accessibility::Accessibility::accessibility_vars_t
]
src/accessibility.cpp(213) : error C2065: 'aggregations' : undeclared identifier
src/accessibility.cpp(213) : error C2228: left of '.begin' must have class/struct/union
type is ''unknown-type''
src/accessibility.cpp(213) : error C2065: 'aggregations' : undeclared identifier
src/accessibility.cpp(213) : error C2228: left of '.end' must have class/struct/union
type is ''unknown-type''
src/accessibility.cpp(214) : error C2065: 'aggregations' : undeclared identifier
src/accessibility.cpp(214) : error C2228: left of '.end' must have class/struct/union
type is ''unknown-type''
src/accessibility.cpp(215) : error C2065: 'decays' : undeclared identifier
src/accessibility.cpp(215) : error C2228: left of '.begin' must have class/struct/union
type is ''unknown-type''
src/accessibility.cpp(215) : error C2065: 'decays' : undeclared identifier
src/accessibility.cpp(215) : error C2228: left of '.end' must have class/struct/union
type is ''unknown-type''
src/accessibility.cpp(215) : error C2065: 'decays' : undeclared identifier
src/accessibility.cpp(215) : error C2228: left of '.end' must have class/struct/union
type is ''unknown-type''
error: command 'C:\\Users\\rafa\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\amd64\\cl.exe' failed with exit status 2
----------------------------------------
Command "C:\Users\rafa\AppData\Local\conda\conda\envs\my_root\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\rafa\\appdata\\local\\temp\\pip-build-2d6cr7\\pandana\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record c:\users\rafa\appdata\local\temp\pip-7ptrkh-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in c:\users\rafa\appdata\local\temp\pip-build-2d6cr7\pandana\
from pandana.
@rafapereirabr looking at this line src/accessibility.cpp(125) : error C2039: 'at' : is not a member of 'std::map<_Kty,_Ty>'
it seems you are using a compiler that does not support the at()
method that was added in c++11
. You will need to use a compiler that supports that standard to compile the code. Please let us know if you are able to fix the issue.
from pandana.
I have installed Microsoft Visual C++ Redistributable for Visual Studio 2017, restarted my pc and tried installing pandana
but I still get the same error. Would have any recommendation on how can I get around this issue?
from pandana.
@rafapereirabr version 0.4.1 was released to conda last week and should fix this issue. Install via: conda install -c udst pandana=0.4.1
. Will close this for now but please test and let us know and we can reopen if it has not been fixed. See related issue #95 for details.
from pandana.
Related Issues (20)
- Support for M1 Macs HOT 3
- [Question] How to get different Key|Value combinations in osm.node_query
- [Feature Request] Aggreggation queries to subset of nodes
- Binary incompatibility error with older versions of NumPy HOT 1
- Shortest path length exists but shortest path is empty HOT 5
- shortest path distance between non connected nodes
- Allow specifying mapping distance for POIs
- Issue: the POI Accessibility computation is taking forever
- OSM loader - POIs that are ways in OSM HOT 1
- Pandana network initiation slow for large network HOT 4
- how to increase the performance of the aggregate when impedance is changed to time?
- net.shortest_paths doesn't work with multiprocessing
- tables sub-dependency versions conflict with python 3.10 compatibility when installing with pip HOT 1
- incorrect shortest paths solutions when impendance values are particularly small or large HOT 1
- Plotting with Pandana does not render title HOT 1
- osm.pdna_network_from_bbox error HOT 6
- Pulling network object from OSM bugged HOT 2
- New release ?
- Google Colab install pandana error HOT 1
- query the OSM API for the street network within the specified bounding box error HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pandana.