Coder Social home page Coder Social logo

Python 3 Support about pandana HOT 5 CLOSED

udst avatar udst commented on July 19, 2024 3
Python 3 Support

from pandana.

Comments (5)

federicofernandez avatar federicofernandez commented on July 19, 2024 2

I'm currently working on migrating the code to Python3.
I'll upload a branch very soon that works with that version.

from pandana.

federicofernandez avatar federicofernandez commented on July 19, 2024 1

The Python3 support branch is merged on master right now.
We plan to release a new version with this changes soon.

from pandana.

knaaptime avatar knaaptime commented on July 19, 2024

FWIW, I just tried compiling pandana using Python 3.5 and I'm getting the error src/pyaccesswrap.cpp:509:50: error: 'Py_InitModule' was not declared in this scope

full trace:

$ python setup.py install
/Users/knaaptime/anaconda/lib/python3.5/site-packages/setuptools/dist.py:333: UserWarning: Normalizing '0.2dev' to '0.2.dev0'
normalized_version,
running install
running bdist_egg
running egg_info
writing top-level names to pandana.egg-info/top_level.txt
writing dependency_links to pandana.egg-info/dependency_links.txt
writing requirements to pandana.egg-info/requires.txt
writing pandana.egg-info/PKG-INFO
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.macosx-10.9-x86_64/egg
running install_lib
running build_py
copying pandana/network.py -> build/lib.macosx-10.9-x86_64-3.5/pandana
copying pandana/loaders/osm.py -> build/lib.macosx-10.9-x86_64-3.5/pandana/loaders
running build_ext
building 'pandana._pyaccess' extension
gcc-6 -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/knaaptime/anaconda/include -arch x86_64 -I/usr/local/opt/readline/include -I/Users/knaaptime/anaconda/lib/python3.5/site-packages/numpy/core/include -I. -Isrc/ann_1.1.2/include -I/Users/knaaptime/anaconda/include/python3.5m -c src/accessibility.cpp -o build/temp.macosx-10.9-x86_64-3.5/src/accessibility.o -w -std=c++0x -O3 -fpic -g -fopenmp -D NO_TR1_MEMORY
cc1plus: warning: command line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++
gcc-6 -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/knaaptime/anaconda/include -arch x86_64 -I/usr/local/opt/readline/include -I/Users/knaaptime/anaconda/lib/python3.5/site-packages/numpy/core/include -I. -Isrc/ann_1.1.2/include -I/Users/knaaptime/anaconda/include/python3.5m -c src/graphalg.cpp -o build/temp.macosx-10.9-x86_64-3.5/src/graphalg.o -w -std=c++0x -O3 -fpic -g -fopenmp -D NO_TR1_MEMORY
cc1plus: warning: command line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++
gcc-6 -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/knaaptime/anaconda/include -arch x86_64 -I/usr/local/opt/readline/include -I/Users/knaaptime/anaconda/lib/python3.5/site-packages/numpy/core/include -I. -Isrc/ann_1.1.2/include -I/Users/knaaptime/anaconda/include/python3.5m -c src/nearestneighbor.cpp -o build/temp.macosx-10.9-x86_64-3.5/src/nearestneighbor.o -w -std=c++0x -O3 -fpic -g -fopenmp -D NO_TR1_MEMORY
cc1plus: warning: command line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++
gcc-6 -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/knaaptime/anaconda/include -arch x86_64 -I/usr/local/opt/readline/include -I/Users/knaaptime/anaconda/lib/python3.5/site-packages/numpy/core/include -I. -Isrc/ann_1.1.2/include -I/Users/knaaptime/anaconda/include/python3.5m -c src/pyaccesswrap.cpp -o build/temp.macosx-10.9-x86_64-3.5/src/pyaccesswrap.o -w -std=c++0x -O3 -fpic -g -fopenmp -D NO_TR1_MEMORY
cc1plus: warning: command line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++
src/pyaccesswrap.cpp: In function 'PyObject* init_pyaccess()':
src/pyaccesswrap.cpp:509:50: error: 'Py_InitModule' was not declared in this scope
PyObject *m=Py_InitModule("_pyaccess", myMethods);
^
error: command 'gcc-6' failed with exit status 1

from pandana.

federicofernandez avatar federicofernandez commented on July 19, 2024

I just uploaded the experimental branch that supports Python3:

https://github.com/UDST/pandana/tree/python3-support

I still have to work a bit more in QA before preparing the PR.

from pandana.

federicofernandez avatar federicofernandez commented on July 19, 2024

Version 0.3.0 was released with Python 3 support.

https://github.com/UDST/pandana/releases/tag/v0.3.0

from pandana.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.