Docker-compose build failing

Metabolism of Cities
Back to topic list

Hello,

I would like to join as a programmer and just downloaded the repo.
I have a mac. Docker and docker-compose are installed. I followed the instructions on github and the video explanation and sudo docker-compose build gives me the following error

11 22.17 ERROR: Command errored out with exit status 1:
11 22.17 command: /usr/local/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-04egziro/fiona/setup.py'"'"'; file='"'"'/tmp/pip-install-04egziro/fiona/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-6g6mfyur
11 22.17 cwd: /tmp/pip-install-04egziro/fiona/
11 22.17 Complete output (2 lines):
11 22.17 Failed to get options via gdal-config: [Errno 2] No such file or directory: 'gdal-config'
11 22.17 A GDAL API version must be specified. Provide a path to gdal-config using a GDAL_CONFIG environment variable or use a GDAL_VERSION environment variable.

Seems like i am missing gdal-config, is there someone who can help out?
Thanks in advance!
Kim

Last edited: 2022-02-20 15:12:04.415892+00:00


Hi Kim,

How wonderful that you are wanting to join us a programmer! 🙌🚀
I've alerted Paul and Guus to see if they can help you and hope that you get a response soon.

Stay tuned,
Carolin


Hej Carolin,
thank you so much. Are there any updates from Paul or Guus?


Hi Kim,

Sorry for the late reply. Paul and I both use Linux and we haven't encountered the issue you're raising.

What have you tried so far? A quick search gives me a number of similar sounding results:

Can you check the answers to these issues and see if it's of any help? If you find a solution please let us know and we can update the documentation.

If it's not helpful please let us know what you've tried to see if we can find a solution.

Cheers,

Guus


Hey Guus,
thanks for the links. I had to modify the Dockerfile:
RUN apt-get update && apt-get install --auto-remove -y \
binutils \
gdal-bin \
libgdal-dev \
python3-gdal \
binutils \
libproj-dev \
ffmpeg

Update C env vars so compiler can find gdal

ENV CPLUS_INCLUDE_PATH=/usr/include/gdal
ENV C_INCLUDE_PATH=/usr/include/gdal

I can build, but there are some issues with the db:
moc_web | Exception in thread django-main-thread:
moc_web | Traceback (most recent call last):
moc_web | File "/usr/local/lib/python3.8/threading.py", line 932, in _bootstrap_inner
moc_web | self.run()
moc_web | File "/usr/local/lib/python3.8/threading.py", line 870, in run
moc_web | self._target(self._args, self._kwargs)
moc_web | File "/usr/local/lib/python3.8/site-packages/django/utils/autoreload.py", line 53, in wrapper
moc_web | fn(
args, **kwargs)
moc_web | File "/usr/local/lib/python3.8/site-packages/channels/management/commands/runserver.py", line 75, in inner_run
moc_web | self.check(display_num_errors=True)
moc_web | File "/usr/local/lib/python3.8/site-packages/django/core/management/base.py", line 392, in check
moc_web | all_issues = checks.run_checks(
moc_web | File "/usr/local/lib/python3.8/site-packages/django/core/checks/registry.py", line 70, in run_checks
moc_web | new_errors = check(app_configs=app_configs, databases=databases)
moc_web | File "/usr/local/lib/python3.8/site-packages/django/core/checks/urls.py", line 13, in check_url_config
moc_web | return check_resolver(resolver)
moc_web | File "/usr/local/lib/python3.8/site-packages/django/core/checks/urls.py", line 23, in check_resolver
moc_web | return check_method()
moc_web | File "/usr/local/lib/python3.8/site-packages/django/urls/resolvers.py", line 408, in check
moc_web | for pattern in self.url_patterns:
moc_web | File "/usr/local/lib/python3.8/site-packages/django/utils/functional.py", line 48, in get
moc_web | res = instance.dict[self.name] = self.func(instance)
moc_web | File "/usr/local/lib/python3.8/site-packages/django/urls/resolvers.py", line 589, in url_patterns
moc_web | patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
moc_web | File "/usr/local/lib/python3.8/site-packages/django/utils/functional.py", line 48, in get
moc_web | res = instance.dict[self.name] = self.func(instance)
moc_web | File "/usr/local/lib/python3.8/site-packages/django/urls/resolvers.py", line 582, in urlconf_module
moc_web | return import_module(self.urlconf_name)
moc_web | File "/usr/local/lib/python3.8/importlib/init.py", line 127, in import_module
moc_web | return _bootstrap._gcd_import(name[level:], package, level)
moc_web | File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
moc_web | File "<frozen importlib._bootstrap>", line 991, in _find_and_load
moc_web | File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
moc_web | File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
moc_web | File "<frozen importlib._bootstrap_external>", line 783, in exec_module
moc_web | File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
moc_web | File "/src/ie/urls.py", line 74, in <module>
moc_web | path('debug/', include(debug_toolbar.urls)),
moc_web | File "/usr/local/lib/python3.8/site-packages/django/urls/conf.py", line 34, in include
moc_web | urlconf_module = import_module(urlconf_module)
moc_web | File "/usr/local/lib/python3.8/importlib/init.py", line 127, in import_module
moc_web | return _bootstrap._gcd_import(name[level:], package, level)
moc_web | File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
moc_web | File "<frozen importlib._bootstrap>", line 991, in _find_and_load
moc_web | File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
moc_web | File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
moc_web | File "<frozen importlib._bootstrap_external>", line 783, in exec_module
moc_web | File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
moc_web | File "/usr/local/lib/python3.8/site-packages/debug_toolbar/urls.py", line 5, in <module>
moc_web | urlpatterns = DebugToolbar.get_urls()
moc_web | File "/usr/local/lib/python3.8/site-packages/debug_toolbar/toolbar.py", line 137, in get_urls
moc_web | for panel_class in cls.get_panel_classes():
moc_web | File "/usr/local/lib/python3.8/site-packages/debug_toolbar/toolbar.py", line 118, in get_panel_classes
moc_web | panel_classes = [
moc_web | File "/usr/local/lib/python3.8/site-packages/debug_toolbar/toolbar.py", line 119, in <listcomp>
moc_web | import_string(panel_path) for panel_path in dt_settings.get_panels()
moc_web | File "/usr/local/lib/python3.8/site-packages/django/utils/module_loading.py", line 17, in import_string
moc_web | module = import_module(module_path)
moc_web | File "/usr/local/lib/python3.8/importlib/init.py", line 127, in import_module
moc_web | return _bootstrap._gcd_import(name[level:], package, level)
moc_web | File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
moc_web | File "<frozen importlib._bootstrap>", line 991, in _find_and_load
moc_web | File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
moc_web | File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
moc_web | File "<frozen importlib._bootstrap_external>", line 783, in exec_module
moc_web | File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
moc_web | File "/usr/local/lib/python3.8/site-packages/debug_toolbar/panels/cache.py", line 155, in <module>
moc_web | middleware_cache.caches = CacheHandlerPatch()
moc_web | File "/usr/local/lib/python3.8/site-packages/debug_toolbar/panels/cache.py", line 145, in init
moc_web | super().init(settings=settings)
moc_web | TypeError: init() got an unexpected keyword argument 'settings'

Let me know, if you have a guess. I will look at it later though.
Thanks in advance!

Last edited: 2022-05-15 20:02:46.128694+00:00

Log in to join the conversation

Sign Up Log In