This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

shapefile install fails on module yaml missing error

0

Hello, I try to setup a tile server with this tutorial: https://switch2osm.org/serving-tiles/manually-building-a-tile-server-20-04-lts/. The process can not be continued at SHAPEFILE DOWNLOAD, because module YAML is missing. I´m not familiar with python, what can I do? Error hits here:

scripts/get-external-data.py

Thx and Regards

asked 19 Oct '21, 00:20

Dom771013's gravatar image

Dom771013
61336
accept rate: 0%

1

Could you provide a full output of the error?

(19 Oct '21, 08:24) Marcos Dione

3 Answers:

1

You should be able to install a system wide version with sudo apt install python3-yaml.

answered 19 Oct '21, 08:23

Marcos%20Dione's gravatar image

Marcos Dione
71113
accept rate: 0%

I've updated https://switch2osm.org/serving-tiles/manually-building-a-tile-server-20-04-lts/ to include python3-yaml . It was present in the Debian 11 guide but not the Ubuntu 20.04 one.

What software is needed changed as what's packaged in various OSes, and also in things like OSM Carto itself, change ver time.

(19 Oct '21, 09:29) SomeoneElse ♦

0

I also tried to install YAML by: /usr/bin/python -m pip install pyyaml

I found that here (last post): https://github.com/yaml/pyyaml/issues/291

So PIP seems also not beeing installed. What went wrong? I missed no line of the tutorial.

Regards

answered 19 Oct '21, 07:24

Dom771013's gravatar image

Dom771013
61336
accept rate: 0%

I missed no line of the tutorial.

No, you didn't. A dependency (that wasn't previously needed but now is) was missing. I've added it at https://github.com/switch2osm/switch2osm.github.io/pull/170 .

The switch2osm guides use the package manager in your OS where possible, in this case Ubuntu's "apt". These days every 2-bit language has at least one package manager (python has "pip" and "cpan", node.js has "npm" and "yarn"). These guides don't use those but instead uses packages bundled (and tested) by Ubuntu.

(19 Oct '21, 09:35) SomeoneElse ♦

0

I solved this my manually adding pip3 and after that by additionally install of pyyaml and requests. The card works now as expected. Thx

sudo apt install python3-pip
/usr/bin/python3 -m pip install pyyaml
/usr/bin/python3 -m pip install requests
/usr/bin/python3 -c 'import yaml'

answered 19 Oct '21, 10:07

Dom771013's gravatar image

Dom771013
61336
accept rate: 0%

edited 19 Oct '21, 10:12

Source code available on GitHub .