Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python bindings syntax error #240

Open
sarpsarpp opened this issue Apr 8, 2021 · 1 comment
Open

python bindings syntax error #240

sarpsarpp opened this issue Apr 8, 2021 · 1 comment

Comments

@sarpsarpp
Copy link

hi, i'm trying to install python bindings to mapnik 3.1.0 on mac os big sur 11.2.2. I didn't understand how to use https://github.com/mapnik/python-mapnik.

i follow the instructions on https://github.com/mapnik/mapnik/wiki/GettingStartedInPython and cannot come clear the second line of the step 1. i get this error:

$ python -c "import mapnik;print mapnik.__file__" File "<string>", line 1 import mapnik;print mapnik.__file__ ^ SyntaxError: invalid syntax

can you please help?

@mpuchko
Copy link

mpuchko commented Apr 26, 2021

perhaps you are running python3, but print mapnik.__file__ is for python2. Try python -c "import mapnik;print(mapnik.__file__)"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants