opendatacube / datacube-ows

Open Data Cube Open Web Services
Other
69 stars 37 forks source link

sh: 1: pybabel: not found #813

Closed pindge closed 2 years ago

pindge commented 2 years ago

datacube-ows version: master ows_config.py version/link:: test

Description

trying to generate new set of translation files for sentinel2 cfg used in test cfg.

ows@6bc16e10b3b0:/code$ datacube-ows-cfg translation -n -D my_ows_project -d  integration_tests/cfg/translations -m integration_tests/cfg/message.po en de
Creating template for language: en
sh: 1: pybabel: not found
Creating template for language: de
sh: 1: pybabel: not found
Language templates created.

What I Did

Paste the command(s) you ran and the output. If there was a crash, please include the traceback here.

pindge commented 2 years ago

with pylabel cli installed we get this error

ows@1876297e872a:/code$ datacube-ows-cfg translation -n -D my_ows_project -d  integration_tests/cfg/translations -m integration_tests/cfg/message.po en de
Creating template for language: en
Traceback (most recent call last):
  File "/usr/local/bin/pybabel", line 5, in <module>
    from babel.messages.frontend import main
  File "/usr/local/lib/python3.8/dist-packages/babel/messages/frontend.py", line 33, in <module>
    from distutils import log as distutils_log
ImportError: cannot import name 'log' from 'distutils' (/usr/lib/python3.8/distutils/__init__.py)
Creating template for language: de
Traceback (most recent call last):
  File "/usr/local/bin/pybabel", line 5, in <module>
    from babel.messages.frontend import main
  File "/usr/local/lib/python3.8/dist-packages/babel/messages/frontend.py", line 33, in <module>
    from distutils import log as distutils_log
ImportError: cannot import name 'log' from 'distutils' (/usr/lib/python3.8/distutils/__init__.py)
pindge commented 2 years ago
ows@2dada0e7b449:/code$ python
Python 3.8.10 (default, Jun  2 2021, 10:49:15) 
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import distutils
>>> from distutils import log
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: cannot import name 'log' from 'distutils' (/usr/lib/python3.8/distutils/__init__.py)