2026-04-21T07:07:29,072 Created temporary directory: /tmp/pip-ephem-wheel-cache-pcz_3myw 2026-04-21T07:07:29,074 Created temporary directory: /tmp/pip-build-tracker-dqa7xvp_ 2026-04-21T07:07:29,074 Initialized build tracking at /tmp/pip-build-tracker-dqa7xvp_ 2026-04-21T07:07:29,075 Created build tracker: /tmp/pip-build-tracker-dqa7xvp_ 2026-04-21T07:07:29,075 Entered build tracker: /tmp/pip-build-tracker-dqa7xvp_ 2026-04-21T07:07:29,076 Created temporary directory: /tmp/pip-wheel-lgdtnupv 2026-04-21T07:07:29,079 DEPRECATION: --no-binary currently disables reading from the cache of locally built wheels. In the future --no-binary will not influence the wheel cache. pip 23.1 will enforce this behaviour change. A possible replacement is to use the --no-cache-dir option. You can use the flag --use-feature=no-binary-enable-wheel-cache to test the upcoming behaviour. Discussion can be found at https://github.com/pypa/pip/issues/11453 2026-04-21T07:07:29,081 Created temporary directory: /tmp/pip-ephem-wheel-cache-l00cceem 2026-04-21T07:07:29,103 Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple 2026-04-21T07:07:29,106 2 location(s) to search for versions of py-staticmaps: 2026-04-21T07:07:29,106 * https://pypi.org/simple/py-staticmaps/ 2026-04-21T07:07:29,106 * https://www.piwheels.org/simple/py-staticmaps/ 2026-04-21T07:07:29,107 Fetching project page and analyzing links: https://pypi.org/simple/py-staticmaps/ 2026-04-21T07:07:29,108 Getting page https://pypi.org/simple/py-staticmaps/ 2026-04-21T07:07:29,109 Found index url https://pypi.org/simple 2026-04-21T07:07:29,337 Fetched page https://pypi.org/simple/py-staticmaps/ as application/vnd.pypi.simple.v1+json 2026-04-21T07:07:29,340 Found link https://files.pythonhosted.org/packages/c1/37/92e15225fa11747d61ad303391a6f4a37f24ef272cfee63e712b0cf080e7/py-staticmaps-0.0.1.tar.gz (from https://pypi.org/simple/py-staticmaps/), version: 0.0.1 2026-04-21T07:07:29,341 Found link https://files.pythonhosted.org/packages/a1/98/00d2f6057cf2f541ccf796f5a3847713e9dc51251d7d4554f9caad338d47/py-staticmaps-0.0.2.tar.gz (from https://pypi.org/simple/py-staticmaps/), version: 0.0.2 2026-04-21T07:07:29,341 Found link https://files.pythonhosted.org/packages/e0/53/00551e1cfb8612c4dc0b6e76c7ed776513155245586799d789e4379c3f35/py-staticmaps-0.1.0.tar.gz (from https://pypi.org/simple/py-staticmaps/), version: 0.1.0 2026-04-21T07:07:29,342 Found link https://files.pythonhosted.org/packages/c8/cf/d25eb225616779dcec60a5f57f858e0437ac67e8dab8bb97635e02407167/py-staticmaps-0.1.1.tar.gz (from https://pypi.org/simple/py-staticmaps/), version: 0.1.1 2026-04-21T07:07:29,343 Found link https://files.pythonhosted.org/packages/92/12/9014b674db3a0a17fe7317d051644bd4a5243f222bc8fa9ab9f3bcc8d330/py-staticmaps-0.2.0.tar.gz (from https://pypi.org/simple/py-staticmaps/), version: 0.2.0 2026-04-21T07:07:29,344 Found link https://files.pythonhosted.org/packages/8f/e2/28896c344c786088c7d7ca18f4cf95e3491a37a010f44e398df38224b274/py-staticmaps-0.2.2.tar.gz (from https://pypi.org/simple/py-staticmaps/), version: 0.2.2 2026-04-21T07:07:29,344 Found link https://files.pythonhosted.org/packages/03/1e/a86e19c1efd133e21d8b541359a15592807d128582147f89539da6529cab/py-staticmaps-0.2.3.tar.gz (from https://pypi.org/simple/py-staticmaps/), version: 0.2.3 2026-04-21T07:07:29,345 Found link https://files.pythonhosted.org/packages/42/e3/deeb3dece94a3b1b36206087677f5937a71a146c91b9616873bdda182822/py-staticmaps-0.3.0.tar.gz (from https://pypi.org/simple/py-staticmaps/), version: 0.3.0 2026-04-21T07:07:29,346 Found link https://files.pythonhosted.org/packages/f9/22/efa565521b37c3cf8b64c6a2c7a3631efae15724231e23c9fd37623df7ef/py-staticmaps-0.4.0.tar.gz (from https://pypi.org/simple/py-staticmaps/), version: 0.4.0 2026-04-21T07:07:29,346 Found link https://files.pythonhosted.org/packages/ae/ec/bebf8868b28c0add54e85c791264a84b18c142a4c872d7da18bc5ef4334b/py_staticmaps-0.5.0.tar.gz (from https://pypi.org/simple/py-staticmaps/), version: 0.5.0 2026-04-21T07:07:29,347 Fetching project page and analyzing links: https://www.piwheels.org/simple/py-staticmaps/ 2026-04-21T07:07:29,348 Getting page https://www.piwheels.org/simple/py-staticmaps/ 2026-04-21T07:07:29,350 Found index url https://www.piwheels.org/simple 2026-04-21T07:07:29,518 Fetched page https://www.piwheels.org/simple/py-staticmaps/ as text/html 2026-04-21T07:07:29,520 Skipping link: No binaries permitted for py-staticmaps: https://archive1.piwheels.org/simple/py-staticmaps/py_staticmaps-0.4.0-py3-none-any.whl#sha256=b609f066f924972d7e75e3fb882788812ce1a873c8014fea1b3c7fa05f87036f (from https://www.piwheels.org/simple/py-staticmaps/) 2026-04-21T07:07:29,521 Skipping link: No binaries permitted for py-staticmaps: https://archive1.piwheels.org/simple/py-staticmaps/py_staticmaps-0.3.0-py3-none-any.whl#sha256=04bdf576bbe49b09308a0a54fe2025e7e56170cb93884fdb102c4e77be8b5b58 (from https://www.piwheels.org/simple/py-staticmaps/) 2026-04-21T07:07:29,522 Skipping link: No binaries permitted for py-staticmaps: https://archive1.piwheels.org/simple/py-staticmaps/py_staticmaps-0.2.3-py3-none-any.whl#sha256=1a16e0df0f365cf527c066160712df7be9febf4546ec8037b912b7588fe53f6f (from https://www.piwheels.org/simple/py-staticmaps/) 2026-04-21T07:07:29,522 Skipping link: No binaries permitted for py-staticmaps: https://archive1.piwheels.org/simple/py-staticmaps/py_staticmaps-0.2.2-py3-none-any.whl#sha256=ba4d5329995df99217a90608e4a0f633667ba8039997f4eb25f7d2efcf22d1e9 (from https://www.piwheels.org/simple/py-staticmaps/) 2026-04-21T07:07:29,523 Skipping link: No binaries permitted for py-staticmaps: https://archive1.piwheels.org/simple/py-staticmaps/py_staticmaps-0.2.0-py3-none-any.whl#sha256=1592d6a242f9f565de9401b5a0bcad7173435d7d4d883902f0e59c4bb450651d (from https://www.piwheels.org/simple/py-staticmaps/) 2026-04-21T07:07:29,523 Skipping link: No binaries permitted for py-staticmaps: https://archive1.piwheels.org/simple/py-staticmaps/py_staticmaps-0.1.1-py3-none-any.whl#sha256=17c998ff6e233557b026f1be675899a19d052af1e901c7b67754cf7a0f78aa03 (from https://www.piwheels.org/simple/py-staticmaps/) 2026-04-21T07:07:29,524 Skipping link: not a file: https://www.piwheels.org/simple/py-staticmaps/ 2026-04-21T07:07:29,524 Skipping link: not a file: https://pypi.org/simple/py-staticmaps/ 2026-04-21T07:07:29,546 Given no hashes to check 1 links for project 'py-staticmaps': discarding no candidates 2026-04-21T07:07:29,566 Collecting py-staticmaps==0.5.0 2026-04-21T07:07:29,568 Created temporary directory: /tmp/pip-unpack-488gwjz7 2026-04-21T07:07:29,717 Downloading py_staticmaps-0.5.0.tar.gz (23 kB) 2026-04-21T07:07:29,810 Added py-staticmaps==0.5.0 from https://files.pythonhosted.org/packages/ae/ec/bebf8868b28c0add54e85c791264a84b18c142a4c872d7da18bc5ef4334b/py_staticmaps-0.5.0.tar.gz to build tracker '/tmp/pip-build-tracker-dqa7xvp_' 2026-04-21T07:07:29,812 Running setup.py (path:/tmp/pip-wheel-lgdtnupv/py-staticmaps_c303a0568a814b808e4a5b4d8f1a8570/setup.py) egg_info for package py-staticmaps 2026-04-21T07:07:29,813 Created temporary directory: /tmp/pip-pip-egg-info-pby3_gld 2026-04-21T07:07:29,814 Preparing metadata (setup.py): started 2026-04-21T07:07:29,815 Running command python setup.py egg_info 2026-04-21T07:07:30,697 /usr/local/lib/python3.11/dist-packages/setuptools/dist.py:765: SetuptoolsDeprecationWarning: License classifiers are deprecated. 2026-04-21T07:07:30,697 !! 2026-04-21T07:07:30,698 ******************************************************************************** 2026-04-21T07:07:30,699 Please consider removing the following classifiers in favor of a SPDX license expression: 2026-04-21T07:07:30,700 License :: OSI Approved :: MIT License 2026-04-21T07:07:30,701 See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details. 2026-04-21T07:07:30,702 ******************************************************************************** 2026-04-21T07:07:30,703 !! 2026-04-21T07:07:30,704 self._finalize_license_expression() 2026-04-21T07:07:30,727 # py-staticmaps 2026-04-21T07:07:30,728 A python module to create static map images (PNG, SVG) with markers, geodesic lines, etc. 2026-04-21T07:07:30,730 ## Features 2026-04-21T07:07:30,731 - Map objects: pin-style markers, image (PNG) markers, polylines, polygons, (geodesic) circles 2026-04-21T07:07:30,732 - Automatic computation of best center + zoom from the added map objects 2026-04-21T07:07:30,732 - Several pre-configured map tile providers 2026-04-21T07:07:30,733 - Proper tile provider attributions display 2026-04-21T07:07:30,733 - On-disc caching of map tile images for faster drawing and reduced load on the tile servers 2026-04-21T07:07:30,734 - Non-anti-aliased drawing via `PILLOW` 2026-04-21T07:07:30,734 - Anti-aliased drawing via `pycairo` (optional; only if `pycairo` is installed properly) 2026-04-21T07:07:30,735 - SVG creation via `svgwrite` 2026-04-21T07:07:30,736 ## Installation 2026-04-21T07:07:30,737 ### SVG + non-anti-aliased PNG version 2026-04-21T07:07:30,738 ```shell 2026-04-21T07:07:30,738 pip install py-staticmaps 2026-04-21T07:07:30,739 ``` 2026-04-21T07:07:30,740 ### SVG + anti-aliased PNG version (via Cairo) 2026-04-21T07:07:30,741 ```shell 2026-04-21T07:07:30,741 pip install py-staticmaps[cairo] 2026-04-21T07:07:30,742 ``` 2026-04-21T07:07:30,743 `py-staticmaps` uses `pycairo` for creating anti-aliased raster-graphics, so make sure `libcairo2` is installed on your system (on Ubuntu just install the `libcairo2-dev` package, i.e. `sudo apt install libcairo2-dev`). 2026-04-21T07:07:30,744 ## Examples 2026-04-21T07:07:30,745 Note: PNG support (e.g. `context.render_cairo(...)`) is only available if the `pycairo` module is installed. 2026-04-21T07:07:30,746 ### Markers and Geodesic Lines 2026-04-21T07:07:30,747 ```python 2026-04-21T07:07:30,748 import staticmaps 2026-04-21T07:07:30,749 context = staticmaps.Context() 2026-04-21T07:07:30,750 context.set_tile_provider(staticmaps.tile_provider_StamenToner) 2026-04-21T07:07:30,751 frankfurt = staticmaps.create_latlng(50.110644, 8.682092) 2026-04-21T07:07:30,751 newyork = staticmaps.create_latlng(40.712728, -74.006015) 2026-04-21T07:07:30,752 context.add_object(staticmaps.Line([frankfurt, newyork], color=staticmaps.BLUE, width=4)) 2026-04-21T07:07:30,753 context.add_object(staticmaps.Marker(frankfurt, color=staticmaps.GREEN, size=12)) 2026-04-21T07:07:30,754 context.add_object(staticmaps.Marker(newyork, color=staticmaps.RED, size=12)) 2026-04-21T07:07:30,755 # render non-anti-aliased png 2026-04-21T07:07:30,755 image = context.render_pillow(800, 500) 2026-04-21T07:07:30,756 image.save("frankfurt_newyork.pillow.png") 2026-04-21T07:07:30,757 # render anti-aliased png (this only works if pycairo is installed) 2026-04-21T07:07:30,758 image = context.render_cairo(800, 500) 2026-04-21T07:07:30,759 image.write_to_png("frankfurt_newyork.cairo.png") 2026-04-21T07:07:30,760 # render svg 2026-04-21T07:07:30,760 svg_image = context.render_svg(800, 500) 2026-04-21T07:07:30,761 with open("frankfurt_newyork.svg", "w", encoding="utf-8") as f: 2026-04-21T07:07:30,761 svg_image.write(f, pretty=True) 2026-04-21T07:07:30,762 ``` 2026-04-21T07:07:30,764 ### Transparent Polygons 2026-04-21T07:07:30,765 ```python 2026-04-21T07:07:30,766 import staticmaps 2026-04-21T07:07:30,767 context = staticmaps.Context() 2026-04-21T07:07:30,767 context.set_tile_provider(staticmaps.tile_provider_OSM) 2026-04-21T07:07:30,768 freiburg_polygon = [ 2026-04-21T07:07:30,769 (47.96881, 7.79045), 2026-04-21T07:07:30,769 (47.96866, 7.78610), 2026-04-21T07:07:30,770 (47.97134, 7.77874), 2026-04-21T07:07:30,770 ... 2026-04-21T07:07:30,771 ] 2026-04-21T07:07:30,772 context.add_object( 2026-04-21T07:07:30,773 staticmaps.Area( 2026-04-21T07:07:30,774 [staticmaps.create_latlng(lat, lng) for lat, lng in freiburg_polygon], 2026-04-21T07:07:30,774 fill_color=staticmaps.parse_color("#00FF003F"), 2026-04-21T07:07:30,775 width=2, 2026-04-21T07:07:30,775 color=staticmaps.BLUE, 2026-04-21T07:07:30,776 ) 2026-04-21T07:07:30,777 ) 2026-04-21T07:07:30,778 # render non-anti-aliased png 2026-04-21T07:07:30,778 image = context.render_pillow(800, 500) 2026-04-21T07:07:30,778 image.save("freiburg_area.pillow.png") 2026-04-21T07:07:30,779 # render anti-aliased png (this only works if pycairo is installed) 2026-04-21T07:07:30,780 image = context.render_cairo(800, 500) 2026-04-21T07:07:30,780 image.write_to_png("freiburg_area.cairo.png") 2026-04-21T07:07:30,781 # render svg 2026-04-21T07:07:30,782 svg_image = context.render_svg(800, 500) 2026-04-21T07:07:30,782 with open("freiburg_area.svg", "w", encoding="utf-8") as f: 2026-04-21T07:07:30,782 svg_image.write(f, pretty=True) 2026-04-21T07:07:30,783 ``` 2026-04-21T07:07:30,785 ### Drawing a GPX Track + Image Marker (PNG) 2026-04-21T07:07:30,786 ```python 2026-04-21T07:07:30,786 import sys 2026-04-21T07:07:30,787 import gpxpy 2026-04-21T07:07:30,788 import staticmaps 2026-04-21T07:07:30,789 context = staticmaps.Context() 2026-04-21T07:07:30,789 context.set_tile_provider(staticmaps.tile_provider_ArcGISWorldImagery) 2026-04-21T07:07:30,790 with open(sys.argv[1], "r") as file: 2026-04-21T07:07:30,791 gpx = gpxpy.parse(file) 2026-04-21T07:07:30,792 for track in gpx.tracks: 2026-04-21T07:07:30,792 for segment in track.segments: 2026-04-21T07:07:30,793 line = [staticmaps.create_latlng(p.latitude, p.longitude) for p in segment.points] 2026-04-21T07:07:30,793 context.add_object(staticmaps.Line(line)) 2026-04-21T07:07:30,794 for p in gpx.walk(only_points=True): 2026-04-21T07:07:30,795 pos = staticmaps.create_latlng(p.latitude, p.longitude) 2026-04-21T07:07:30,795 marker = staticmaps.ImageMarker(pos, "start.png", origin_x=27, origin_y=35) 2026-04-21T07:07:30,796 context.add_object(marker) 2026-04-21T07:07:30,796 break 2026-04-21T07:07:30,798 # render non-anti-aliased png 2026-04-21T07:07:30,798 image = context.render_pillow(800, 500) 2026-04-21T07:07:30,799 image.save("draw_gpx.pillow.png") 2026-04-21T07:07:30,800 # render anti-aliased png (this only works if pycairo is installed) 2026-04-21T07:07:30,800 image = context.render_cairo(800, 500) 2026-04-21T07:07:30,801 image.write_to_png("draw_gpx.cairo.png") 2026-04-21T07:07:30,802 ``` 2026-04-21T07:07:30,804 ### US State Capitals 2026-04-21T07:07:30,805 ```python 2026-04-21T07:07:30,806 import json 2026-04-21T07:07:30,806 import requests 2026-04-21T07:07:30,807 import staticmaps 2026-04-21T07:07:30,808 context = staticmaps.Context() 2026-04-21T07:07:30,809 context.set_tile_provider(staticmaps.tile_provider_OSM) 2026-04-21T07:07:30,810 URL = ( 2026-04-21T07:07:30,811 "https://gist.githubusercontent.com/jpriebe/d62a45e29f24e843c974/" 2026-04-21T07:07:30,812 "raw/b1d3066d245e742018bce56e41788ac7afa60e29/us_state_capitals.json" 2026-04-21T07:07:30,812 ) 2026-04-21T07:07:30,813 response = requests.get(URL) 2026-04-21T07:07:30,813 for _, data in json.loads(response.text).items(): 2026-04-21T07:07:30,814 capital = staticmaps.create_latlng(float(data["lat"]), float(data["long"])) 2026-04-21T07:07:30,814 context.add_object(staticmaps.Marker(capital, size=5)) 2026-04-21T07:07:30,816 # render non-anti-aliased png 2026-04-21T07:07:30,817 image = context.render_pillow(800, 500) 2026-04-21T07:07:30,817 image.save("us_capitals.pillow.png") 2026-04-21T07:07:30,818 # render anti-aliased png (this only works if pycairo is installed) 2026-04-21T07:07:30,819 image = context.render_cairo(800, 500) 2026-04-21T07:07:30,820 image.write_to_png("us_capitals.cairo.png") 2026-04-21T07:07:30,820 ``` 2026-04-21T07:07:30,823 ### Geodesic Circles 2026-04-21T07:07:30,824 ```python 2026-04-21T07:07:30,825 import staticmaps 2026-04-21T07:07:30,826 context = staticmaps.Context() 2026-04-21T07:07:30,827 context.set_tile_provider(staticmaps.tile_provider_StamenToner) 2026-04-21T07:07:30,828 center1 = staticmaps.create_latlng(66, 0) 2026-04-21T07:07:30,829 center2 = staticmaps.create_latlng(0, 0) 2026-04-21T07:07:30,830 context.add_object(staticmaps.Circle(center1, 2000, fill_color=staticmaps.TRANSPARENT, color=staticmaps.RED, width=2)) 2026-04-21T07:07:30,830 context.add_object(staticmaps.Circle(center2, 2000, fill_color=staticmaps.TRANSPARENT, color=staticmaps.GREEN, width=2)) 2026-04-21T07:07:30,831 context.add_object(staticmaps.Marker(center1, color=staticmaps.RED)) 2026-04-21T07:07:30,831 context.add_object(staticmaps.Marker(center2, color=staticmaps.GREEN)) 2026-04-21T07:07:30,832 # render non-anti-aliased png 2026-04-21T07:07:30,833 image = context.render_pillow(800, 500) 2026-04-21T07:07:30,833 image.save("geodesic_circles.pillow.png") 2026-04-21T07:07:30,834 # render anti-aliased png (this only works if pycairo is installed) 2026-04-21T07:07:30,835 image = context.render_cairo(800, 600) 2026-04-21T07:07:30,835 image.write_to_png("geodesic_circles.cairo.png") 2026-04-21T07:07:30,836 ``` 2026-04-21T07:07:30,838 ### Other Examples 2026-04-21T07:07:30,839 Please take a look at the command line program which uses the `staticmaps` package: `staticmaps/cli.py` 2026-04-21T07:07:30,840 ### Dependencies 2026-04-21T07:07:30,841 `py-staticmaps` uses 2026-04-21T07:07:30,842 - `PILLOW` for rendering raster-graphics 2026-04-21T07:07:30,842 - `pycairo` for rendering antialiased raster-graphics (optional!) 2026-04-21T07:07:30,843 - `svgwrite` for writing SVG files 2026-04-21T07:07:30,843 - `s2sphere` for geo coordinates handling 2026-04-21T07:07:30,844 - `geographiclib` for geodesic computations 2026-04-21T07:07:30,844 - `appdirs` for finding the user's default cache directory 2026-04-21T07:07:30,845 - `requests` for downloading tile files 2026-04-21T07:07:30,846 ## License 2026-04-21T07:07:30,848 [MIT](LICENSE) © 2020-2021 Florian Pigorsch 2026-04-21T07:07:30,849 running egg_info 2026-04-21T07:07:30,849 creating /tmp/pip-pip-egg-info-pby3_gld/py_staticmaps.egg-info 2026-04-21T07:07:30,850 writing /tmp/pip-pip-egg-info-pby3_gld/py_staticmaps.egg-info/PKG-INFO 2026-04-21T07:07:30,851 writing dependency_links to /tmp/pip-pip-egg-info-pby3_gld/py_staticmaps.egg-info/dependency_links.txt 2026-04-21T07:07:30,851 writing entry points to /tmp/pip-pip-egg-info-pby3_gld/py_staticmaps.egg-info/entry_points.txt 2026-04-21T07:07:30,852 writing requirements to /tmp/pip-pip-egg-info-pby3_gld/py_staticmaps.egg-info/requires.txt 2026-04-21T07:07:30,852 writing top-level names to /tmp/pip-pip-egg-info-pby3_gld/py_staticmaps.egg-info/top_level.txt 2026-04-21T07:07:30,853 writing manifest file '/tmp/pip-pip-egg-info-pby3_gld/py_staticmaps.egg-info/SOURCES.txt' 2026-04-21T07:07:30,881 reading manifest file '/tmp/pip-pip-egg-info-pby3_gld/py_staticmaps.egg-info/SOURCES.txt' 2026-04-21T07:07:30,883 reading manifest template 'MANIFEST.in' 2026-04-21T07:07:30,885 warning: no previously-included files matching '__pycache__' found under directory '*' 2026-04-21T07:07:30,886 warning: no previously-included files matching '*.py[co]' found under directory '*' 2026-04-21T07:07:30,887 adding license file 'LICENSE' 2026-04-21T07:07:30,890 writing manifest file '/tmp/pip-pip-egg-info-pby3_gld/py_staticmaps.egg-info/SOURCES.txt' 2026-04-21T07:07:30,998 Preparing metadata (setup.py): finished with status 'done' 2026-04-21T07:07:31,002 Source in /tmp/pip-wheel-lgdtnupv/py-staticmaps_c303a0568a814b808e4a5b4d8f1a8570 has version 0.5.0, which satisfies requirement py-staticmaps==0.5.0 from https://files.pythonhosted.org/packages/ae/ec/bebf8868b28c0add54e85c791264a84b18c142a4c872d7da18bc5ef4334b/py_staticmaps-0.5.0.tar.gz 2026-04-21T07:07:31,003 Removed py-staticmaps==0.5.0 from https://files.pythonhosted.org/packages/ae/ec/bebf8868b28c0add54e85c791264a84b18c142a4c872d7da18bc5ef4334b/py_staticmaps-0.5.0.tar.gz from build tracker '/tmp/pip-build-tracker-dqa7xvp_' 2026-04-21T07:07:31,009 Created temporary directory: /tmp/pip-unpack-i7d6ydj1 2026-04-21T07:07:31,010 Building wheels for collected packages: py-staticmaps 2026-04-21T07:07:31,015 Created temporary directory: /tmp/pip-wheel-jsmbjbbn 2026-04-21T07:07:31,015 Building wheel for py-staticmaps (setup.py): started 2026-04-21T07:07:31,017 Destination directory: /tmp/pip-wheel-jsmbjbbn 2026-04-21T07:07:31,017 Running command python setup.py bdist_wheel 2026-04-21T07:07:31,499 # py-staticmaps 2026-04-21T07:07:31,499 A python module to create static map images (PNG, SVG) with markers, geodesic lines, etc. 2026-04-21T07:07:31,501 ## Features 2026-04-21T07:07:31,502 - Map objects: pin-style markers, image (PNG) markers, polylines, polygons, (geodesic) circles 2026-04-21T07:07:31,502 - Automatic computation of best center + zoom from the added map objects 2026-04-21T07:07:31,502 - Several pre-configured map tile providers 2026-04-21T07:07:31,503 - Proper tile provider attributions display 2026-04-21T07:07:31,503 - On-disc caching of map tile images for faster drawing and reduced load on the tile servers 2026-04-21T07:07:31,504 - Non-anti-aliased drawing via `PILLOW` 2026-04-21T07:07:31,504 - Anti-aliased drawing via `pycairo` (optional; only if `pycairo` is installed properly) 2026-04-21T07:07:31,505 - SVG creation via `svgwrite` 2026-04-21T07:07:31,506 ## Installation 2026-04-21T07:07:31,507 ### SVG + non-anti-aliased PNG version 2026-04-21T07:07:31,508 ```shell 2026-04-21T07:07:31,509 pip install py-staticmaps 2026-04-21T07:07:31,509 ``` 2026-04-21T07:07:31,510 ### SVG + anti-aliased PNG version (via Cairo) 2026-04-21T07:07:31,511 ```shell 2026-04-21T07:07:31,512 pip install py-staticmaps[cairo] 2026-04-21T07:07:31,512 ``` 2026-04-21T07:07:31,513 `py-staticmaps` uses `pycairo` for creating anti-aliased raster-graphics, so make sure `libcairo2` is installed on your system (on Ubuntu just install the `libcairo2-dev` package, i.e. `sudo apt install libcairo2-dev`). 2026-04-21T07:07:31,515 ## Examples 2026-04-21T07:07:31,516 Note: PNG support (e.g. `context.render_cairo(...)`) is only available if the `pycairo` module is installed. 2026-04-21T07:07:31,517 ### Markers and Geodesic Lines 2026-04-21T07:07:31,518 ```python 2026-04-21T07:07:31,518 import staticmaps 2026-04-21T07:07:31,520 context = staticmaps.Context() 2026-04-21T07:07:31,520 context.set_tile_provider(staticmaps.tile_provider_StamenToner) 2026-04-21T07:07:31,521 frankfurt = staticmaps.create_latlng(50.110644, 8.682092) 2026-04-21T07:07:31,522 newyork = staticmaps.create_latlng(40.712728, -74.006015) 2026-04-21T07:07:31,523 context.add_object(staticmaps.Line([frankfurt, newyork], color=staticmaps.BLUE, width=4)) 2026-04-21T07:07:31,524 context.add_object(staticmaps.Marker(frankfurt, color=staticmaps.GREEN, size=12)) 2026-04-21T07:07:31,524 context.add_object(staticmaps.Marker(newyork, color=staticmaps.RED, size=12)) 2026-04-21T07:07:31,526 # render non-anti-aliased png 2026-04-21T07:07:31,526 image = context.render_pillow(800, 500) 2026-04-21T07:07:31,527 image.save("frankfurt_newyork.pillow.png") 2026-04-21T07:07:31,528 # render anti-aliased png (this only works if pycairo is installed) 2026-04-21T07:07:31,529 image = context.render_cairo(800, 500) 2026-04-21T07:07:31,529 image.write_to_png("frankfurt_newyork.cairo.png") 2026-04-21T07:07:31,531 # render svg 2026-04-21T07:07:31,531 svg_image = context.render_svg(800, 500) 2026-04-21T07:07:31,532 with open("frankfurt_newyork.svg", "w", encoding="utf-8") as f: 2026-04-21T07:07:31,532 svg_image.write(f, pretty=True) 2026-04-21T07:07:31,533 ``` 2026-04-21T07:07:31,535 ### Transparent Polygons 2026-04-21T07:07:31,537 ```python 2026-04-21T07:07:31,537 import staticmaps 2026-04-21T07:07:31,539 context = staticmaps.Context() 2026-04-21T07:07:31,539 context.set_tile_provider(staticmaps.tile_provider_OSM) 2026-04-21T07:07:31,541 freiburg_polygon = [ 2026-04-21T07:07:31,541 (47.96881, 7.79045), 2026-04-21T07:07:31,542 (47.96866, 7.78610), 2026-04-21T07:07:31,543 (47.97134, 7.77874), 2026-04-21T07:07:31,543 ... 2026-04-21T07:07:31,544 ] 2026-04-21T07:07:31,545 context.add_object( 2026-04-21T07:07:31,545 staticmaps.Area( 2026-04-21T07:07:31,546 [staticmaps.create_latlng(lat, lng) for lat, lng in freiburg_polygon], 2026-04-21T07:07:31,546 fill_color=staticmaps.parse_color("#00FF003F"), 2026-04-21T07:07:31,547 width=2, 2026-04-21T07:07:31,547 color=staticmaps.BLUE, 2026-04-21T07:07:31,548 ) 2026-04-21T07:07:31,548 ) 2026-04-21T07:07:31,549 # render non-anti-aliased png 2026-04-21T07:07:31,550 image = context.render_pillow(800, 500) 2026-04-21T07:07:31,550 image.save("freiburg_area.pillow.png") 2026-04-21T07:07:31,551 # render anti-aliased png (this only works if pycairo is installed) 2026-04-21T07:07:31,552 image = context.render_cairo(800, 500) 2026-04-21T07:07:31,552 image.write_to_png("freiburg_area.cairo.png") 2026-04-21T07:07:31,553 # render svg 2026-04-21T07:07:31,553 svg_image = context.render_svg(800, 500) 2026-04-21T07:07:31,554 with open("freiburg_area.svg", "w", encoding="utf-8") as f: 2026-04-21T07:07:31,554 svg_image.write(f, pretty=True) 2026-04-21T07:07:31,555 ``` 2026-04-21T07:07:31,557 ### Drawing a GPX Track + Image Marker (PNG) 2026-04-21T07:07:31,558 ```python 2026-04-21T07:07:31,558 import sys 2026-04-21T07:07:31,559 import gpxpy 2026-04-21T07:07:31,560 import staticmaps 2026-04-21T07:07:31,561 context = staticmaps.Context() 2026-04-21T07:07:31,562 context.set_tile_provider(staticmaps.tile_provider_ArcGISWorldImagery) 2026-04-21T07:07:31,563 with open(sys.argv[1], "r") as file: 2026-04-21T07:07:31,563 gpx = gpxpy.parse(file) 2026-04-21T07:07:31,564 for track in gpx.tracks: 2026-04-21T07:07:31,565 for segment in track.segments: 2026-04-21T07:07:31,565 line = [staticmaps.create_latlng(p.latitude, p.longitude) for p in segment.points] 2026-04-21T07:07:31,566 context.add_object(staticmaps.Line(line)) 2026-04-21T07:07:31,567 for p in gpx.walk(only_points=True): 2026-04-21T07:07:31,568 pos = staticmaps.create_latlng(p.latitude, p.longitude) 2026-04-21T07:07:31,568 marker = staticmaps.ImageMarker(pos, "start.png", origin_x=27, origin_y=35) 2026-04-21T07:07:31,569 context.add_object(marker) 2026-04-21T07:07:31,569 break 2026-04-21T07:07:31,571 # render non-anti-aliased png 2026-04-21T07:07:31,571 image = context.render_pillow(800, 500) 2026-04-21T07:07:31,572 image.save("draw_gpx.pillow.png") 2026-04-21T07:07:31,573 # render anti-aliased png (this only works if pycairo is installed) 2026-04-21T07:07:31,573 image = context.render_cairo(800, 500) 2026-04-21T07:07:31,574 image.write_to_png("draw_gpx.cairo.png") 2026-04-21T07:07:31,575 ``` 2026-04-21T07:07:31,577 ### US State Capitals 2026-04-21T07:07:31,578 ```python 2026-04-21T07:07:31,579 import json 2026-04-21T07:07:31,579 import requests 2026-04-21T07:07:31,580 import staticmaps 2026-04-21T07:07:31,581 context = staticmaps.Context() 2026-04-21T07:07:31,582 context.set_tile_provider(staticmaps.tile_provider_OSM) 2026-04-21T07:07:31,583 URL = ( 2026-04-21T07:07:31,584 "https://gist.githubusercontent.com/jpriebe/d62a45e29f24e843c974/" 2026-04-21T07:07:31,584 "raw/b1d3066d245e742018bce56e41788ac7afa60e29/us_state_capitals.json" 2026-04-21T07:07:31,585 ) 2026-04-21T07:07:31,586 response = requests.get(URL) 2026-04-21T07:07:31,586 for _, data in json.loads(response.text).items(): 2026-04-21T07:07:31,587 capital = staticmaps.create_latlng(float(data["lat"]), float(data["long"])) 2026-04-21T07:07:31,587 context.add_object(staticmaps.Marker(capital, size=5)) 2026-04-21T07:07:31,589 # render non-anti-aliased png 2026-04-21T07:07:31,589 image = context.render_pillow(800, 500) 2026-04-21T07:07:31,590 image.save("us_capitals.pillow.png") 2026-04-21T07:07:31,591 # render anti-aliased png (this only works if pycairo is installed) 2026-04-21T07:07:31,592 image = context.render_cairo(800, 500) 2026-04-21T07:07:31,592 image.write_to_png("us_capitals.cairo.png") 2026-04-21T07:07:31,593 ``` 2026-04-21T07:07:31,595 ### Geodesic Circles 2026-04-21T07:07:31,596 ```python 2026-04-21T07:07:31,596 import staticmaps 2026-04-21T07:07:31,597 context = staticmaps.Context() 2026-04-21T07:07:31,598 context.set_tile_provider(staticmaps.tile_provider_StamenToner) 2026-04-21T07:07:31,599 center1 = staticmaps.create_latlng(66, 0) 2026-04-21T07:07:31,599 center2 = staticmaps.create_latlng(0, 0) 2026-04-21T07:07:31,600 context.add_object(staticmaps.Circle(center1, 2000, fill_color=staticmaps.TRANSPARENT, color=staticmaps.RED, width=2)) 2026-04-21T07:07:31,600 context.add_object(staticmaps.Circle(center2, 2000, fill_color=staticmaps.TRANSPARENT, color=staticmaps.GREEN, width=2)) 2026-04-21T07:07:31,601 context.add_object(staticmaps.Marker(center1, color=staticmaps.RED)) 2026-04-21T07:07:31,601 context.add_object(staticmaps.Marker(center2, color=staticmaps.GREEN)) 2026-04-21T07:07:31,602 # render non-anti-aliased png 2026-04-21T07:07:31,603 image = context.render_pillow(800, 500) 2026-04-21T07:07:31,603 image.save("geodesic_circles.pillow.png") 2026-04-21T07:07:31,604 # render anti-aliased png (this only works if pycairo is installed) 2026-04-21T07:07:31,605 image = context.render_cairo(800, 600) 2026-04-21T07:07:31,605 image.write_to_png("geodesic_circles.cairo.png") 2026-04-21T07:07:31,606 ``` 2026-04-21T07:07:31,608 ### Other Examples 2026-04-21T07:07:31,609 Please take a look at the command line program which uses the `staticmaps` package: `staticmaps/cli.py` 2026-04-21T07:07:31,610 ### Dependencies 2026-04-21T07:07:31,611 `py-staticmaps` uses 2026-04-21T07:07:31,612 - `PILLOW` for rendering raster-graphics 2026-04-21T07:07:31,613 - `pycairo` for rendering antialiased raster-graphics (optional!) 2026-04-21T07:07:31,614 - `svgwrite` for writing SVG files 2026-04-21T07:07:31,614 - `s2sphere` for geo coordinates handling 2026-04-21T07:07:31,615 - `geographiclib` for geodesic computations 2026-04-21T07:07:31,615 - `appdirs` for finding the user's default cache directory 2026-04-21T07:07:31,616 - `requests` for downloading tile files 2026-04-21T07:07:31,618 ## License 2026-04-21T07:07:31,619 [MIT](LICENSE) © 2020-2021 Florian Pigorsch 2026-04-21T07:07:31,878 /usr/local/lib/python3.11/dist-packages/setuptools/dist.py:765: SetuptoolsDeprecationWarning: License classifiers are deprecated. 2026-04-21T07:07:31,879 !! 2026-04-21T07:07:31,880 ******************************************************************************** 2026-04-21T07:07:31,881 Please consider removing the following classifiers in favor of a SPDX license expression: 2026-04-21T07:07:31,882 License :: OSI Approved :: MIT License 2026-04-21T07:07:31,883 See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details. 2026-04-21T07:07:31,883 ******************************************************************************** 2026-04-21T07:07:31,884 !! 2026-04-21T07:07:31,885 self._finalize_license_expression() 2026-04-21T07:07:31,885 running bdist_wheel 2026-04-21T07:07:32,013 running build 2026-04-21T07:07:32,014 running build_py 2026-04-21T07:07:32,046 creating build/lib/staticmaps 2026-04-21T07:07:32,048 copying staticmaps/transformer.py -> build/lib/staticmaps 2026-04-21T07:07:32,051 copying staticmaps/image_marker.py -> build/lib/staticmaps 2026-04-21T07:07:32,053 copying staticmaps/marker.py -> build/lib/staticmaps 2026-04-21T07:07:32,056 copying staticmaps/object.py -> build/lib/staticmaps 2026-04-21T07:07:32,058 copying staticmaps/cairo_renderer.py -> build/lib/staticmaps 2026-04-21T07:07:32,060 copying staticmaps/circle.py -> build/lib/staticmaps 2026-04-21T07:07:32,062 copying staticmaps/meta.py -> build/lib/staticmaps 2026-04-21T07:07:32,063 copying staticmaps/color.py -> build/lib/staticmaps 2026-04-21T07:07:32,065 copying staticmaps/area.py -> build/lib/staticmaps 2026-04-21T07:07:32,067 copying staticmaps/cli.py -> build/lib/staticmaps 2026-04-21T07:07:32,070 copying staticmaps/tile_provider.py -> build/lib/staticmaps 2026-04-21T07:07:32,072 copying staticmaps/renderer.py -> build/lib/staticmaps 2026-04-21T07:07:32,074 copying staticmaps/context.py -> build/lib/staticmaps 2026-04-21T07:07:32,076 copying staticmaps/pillow_renderer.py -> build/lib/staticmaps 2026-04-21T07:07:32,079 copying staticmaps/line.py -> build/lib/staticmaps 2026-04-21T07:07:32,081 copying staticmaps/svg_renderer.py -> build/lib/staticmaps 2026-04-21T07:07:32,083 copying staticmaps/tile_downloader.py -> build/lib/staticmaps 2026-04-21T07:07:32,085 copying staticmaps/coordinates.py -> build/lib/staticmaps 2026-04-21T07:07:32,087 copying staticmaps/__init__.py -> build/lib/staticmaps 2026-04-21T07:07:32,118 /usr/local/lib/python3.11/dist-packages/setuptools/_distutils/cmd.py:90: SetuptoolsDeprecationWarning: setup.py install is deprecated. 2026-04-21T07:07:32,118 !! 2026-04-21T07:07:32,119 ******************************************************************************** 2026-04-21T07:07:32,120 Please avoid running ``setup.py`` directly. 2026-04-21T07:07:32,120 Instead, use pypa/build, pypa/installer or other 2026-04-21T07:07:32,121 standards-based tools. 2026-04-21T07:07:32,122 This deprecation is overdue, please update your project and remove deprecated 2026-04-21T07:07:32,122 calls to avoid build errors in the future. 2026-04-21T07:07:32,123 See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details. 2026-04-21T07:07:32,124 ******************************************************************************** 2026-04-21T07:07:32,125 !! 2026-04-21T07:07:32,125 self.initialize_options() 2026-04-21T07:07:32,147 installing to build/bdist.linux-armv7l/wheel 2026-04-21T07:07:32,147 running install 2026-04-21T07:07:32,171 running install_lib 2026-04-21T07:07:32,198 creating build/bdist.linux-armv7l/wheel 2026-04-21T07:07:32,201 creating build/bdist.linux-armv7l/wheel/staticmaps 2026-04-21T07:07:32,202 copying build/lib/staticmaps/transformer.py -> build/bdist.linux-armv7l/wheel/./staticmaps 2026-04-21T07:07:32,204 copying build/lib/staticmaps/image_marker.py -> build/bdist.linux-armv7l/wheel/./staticmaps 2026-04-21T07:07:32,207 copying build/lib/staticmaps/marker.py -> build/bdist.linux-armv7l/wheel/./staticmaps 2026-04-21T07:07:32,209 copying build/lib/staticmaps/object.py -> build/bdist.linux-armv7l/wheel/./staticmaps 2026-04-21T07:07:32,211 copying build/lib/staticmaps/cairo_renderer.py -> build/bdist.linux-armv7l/wheel/./staticmaps 2026-04-21T07:07:32,213 copying build/lib/staticmaps/circle.py -> build/bdist.linux-armv7l/wheel/./staticmaps 2026-04-21T07:07:32,215 copying build/lib/staticmaps/meta.py -> build/bdist.linux-armv7l/wheel/./staticmaps 2026-04-21T07:07:32,217 copying build/lib/staticmaps/color.py -> build/bdist.linux-armv7l/wheel/./staticmaps 2026-04-21T07:07:32,219 copying build/lib/staticmaps/area.py -> build/bdist.linux-armv7l/wheel/./staticmaps 2026-04-21T07:07:32,221 copying build/lib/staticmaps/cli.py -> build/bdist.linux-armv7l/wheel/./staticmaps 2026-04-21T07:07:32,223 copying build/lib/staticmaps/tile_provider.py -> build/bdist.linux-armv7l/wheel/./staticmaps 2026-04-21T07:07:32,225 copying build/lib/staticmaps/renderer.py -> build/bdist.linux-armv7l/wheel/./staticmaps 2026-04-21T07:07:32,227 copying build/lib/staticmaps/context.py -> build/bdist.linux-armv7l/wheel/./staticmaps 2026-04-21T07:07:32,229 copying build/lib/staticmaps/pillow_renderer.py -> build/bdist.linux-armv7l/wheel/./staticmaps 2026-04-21T07:07:32,232 copying build/lib/staticmaps/line.py -> build/bdist.linux-armv7l/wheel/./staticmaps 2026-04-21T07:07:32,234 copying build/lib/staticmaps/svg_renderer.py -> build/bdist.linux-armv7l/wheel/./staticmaps 2026-04-21T07:07:32,236 copying build/lib/staticmaps/tile_downloader.py -> build/bdist.linux-armv7l/wheel/./staticmaps 2026-04-21T07:07:32,238 copying build/lib/staticmaps/coordinates.py -> build/bdist.linux-armv7l/wheel/./staticmaps 2026-04-21T07:07:32,240 copying build/lib/staticmaps/__init__.py -> build/bdist.linux-armv7l/wheel/./staticmaps 2026-04-21T07:07:32,242 running install_egg_info 2026-04-21T07:07:32,278 running egg_info 2026-04-21T07:07:32,305 writing py_staticmaps.egg-info/PKG-INFO 2026-04-21T07:07:32,311 writing dependency_links to py_staticmaps.egg-info/dependency_links.txt 2026-04-21T07:07:32,312 writing entry points to py_staticmaps.egg-info/entry_points.txt 2026-04-21T07:07:32,314 writing requirements to py_staticmaps.egg-info/requires.txt 2026-04-21T07:07:32,316 writing top-level names to py_staticmaps.egg-info/top_level.txt 2026-04-21T07:07:32,346 reading manifest file 'py_staticmaps.egg-info/SOURCES.txt' 2026-04-21T07:07:32,350 reading manifest template 'MANIFEST.in' 2026-04-21T07:07:32,352 warning: no previously-included files matching '__pycache__' found under directory '*' 2026-04-21T07:07:32,353 warning: no previously-included files matching '*.py[co]' found under directory '*' 2026-04-21T07:07:32,354 adding license file 'LICENSE' 2026-04-21T07:07:32,357 writing manifest file 'py_staticmaps.egg-info/SOURCES.txt' 2026-04-21T07:07:32,358 Copying py_staticmaps.egg-info to build/bdist.linux-armv7l/wheel/./py_staticmaps-0.5.0-py3.11.egg-info 2026-04-21T07:07:32,369 running install_scripts 2026-04-21T07:07:32,381 creating build/bdist.linux-armv7l/wheel/py_staticmaps-0.5.0.dist-info/WHEEL 2026-04-21T07:07:32,383 creating '/tmp/pip-wheel-jsmbjbbn/py_staticmaps-0.5.0-py3-none-any.whl' and adding 'build/bdist.linux-armv7l/wheel' to it 2026-04-21T07:07:32,386 adding 'py_staticmaps-0.5.0.dist-info/licenses/LICENSE' 2026-04-21T07:07:32,388 adding 'staticmaps/__init__.py' 2026-04-21T07:07:32,390 adding 'staticmaps/area.py' 2026-04-21T07:07:32,391 adding 'staticmaps/cairo_renderer.py' 2026-04-21T07:07:32,393 adding 'staticmaps/circle.py' 2026-04-21T07:07:32,394 adding 'staticmaps/cli.py' 2026-04-21T07:07:32,396 adding 'staticmaps/color.py' 2026-04-21T07:07:32,398 adding 'staticmaps/context.py' 2026-04-21T07:07:32,399 adding 'staticmaps/coordinates.py' 2026-04-21T07:07:32,400 adding 'staticmaps/image_marker.py' 2026-04-21T07:07:32,402 adding 'staticmaps/line.py' 2026-04-21T07:07:32,403 adding 'staticmaps/marker.py' 2026-04-21T07:07:32,404 adding 'staticmaps/meta.py' 2026-04-21T07:07:32,406 adding 'staticmaps/object.py' 2026-04-21T07:07:32,407 adding 'staticmaps/pillow_renderer.py' 2026-04-21T07:07:32,409 adding 'staticmaps/renderer.py' 2026-04-21T07:07:32,410 adding 'staticmaps/svg_renderer.py' 2026-04-21T07:07:32,411 adding 'staticmaps/tile_downloader.py' 2026-04-21T07:07:32,413 adding 'staticmaps/tile_provider.py' 2026-04-21T07:07:32,414 adding 'staticmaps/transformer.py' 2026-04-21T07:07:32,416 adding 'py_staticmaps-0.5.0.dist-info/METADATA' 2026-04-21T07:07:32,418 adding 'py_staticmaps-0.5.0.dist-info/WHEEL' 2026-04-21T07:07:32,418 adding 'py_staticmaps-0.5.0.dist-info/entry_points.txt' 2026-04-21T07:07:32,419 adding 'py_staticmaps-0.5.0.dist-info/top_level.txt' 2026-04-21T07:07:32,420 adding 'py_staticmaps-0.5.0.dist-info/RECORD' 2026-04-21T07:07:32,422 removing build/bdist.linux-armv7l/wheel 2026-04-21T07:07:32,540 Building wheel for py-staticmaps (setup.py): finished with status 'done' 2026-04-21T07:07:32,542 Created wheel for py-staticmaps: filename=py_staticmaps-0.5.0-py3-none-any.whl size=30143 sha256=d658c7e7b7e114c2e1b59689c35ebb5abc761ad1083a820191618305fd603673 2026-04-21T07:07:32,544 Stored in directory: /tmp/pip-ephem-wheel-cache-l00cceem/wheels/58/58/7e/3fdd7a5f1968279e04e16e6b8df3b1ee1abbe7ec7d4c5d83d6 2026-04-21T07:07:32,557 Successfully built py-staticmaps 2026-04-21T07:07:32,560 Removed build tracker: '/tmp/pip-build-tracker-dqa7xvp_'