can't install DCAT
When trying to install DCAT with the script provided in dockerfile.dev I immediately get an error trying to build Docker.
RUN pip3 install -e git+https://github.com/ckan/[email protected]#egg=ckanext-dcat && \
pip3 install -r https://raw.githubusercontent.com/ckan/ckanext-dcat/v0.0.6/requirements.txt
'done'
11.34 Collecting rdflib==4.2.1 (from -r https://raw.githubusercontent.com/ckan/ckanext-dcat/v0.0.6/requirements.txt (line 1))
11.45 Downloading rdflib-4.2.1.tar.gz (889 kB)
11.57 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 889.5/889.5 kB 8.2 MB/s eta 0:00:00
12.31 Preparing metadata (setup.py): started
13.17 Preparing metadata (setup.py): finished with status 'error'
13.17 error: subprocess-exited-with-error
13.17
13.17 × python setup.py egg_info did not run successfully.
13.17 │ exit code: 1
13.17 ╰─> [11 lines of output]
13.17 no previously-included directories found matching 'docs/_build'
13.17 warning: no previously-included files matching '*.pyc' found anywhere in distribution
13.17 warning: no previously-included files matching '*$py.class' found anywhere in distribution
13.17 Traceback (most recent call last):
13.17 File "<string>", line 2, in <module>
13.17 File "<pip-setuptools-caller>", line 34, in <module>
13.17 File "/tmp/pip-install-f2p4v6n1/rdflib_977d0e9dfa1c4a449cab88b10d46a7ee/setup.py", line 46, in <module>
13.17 kwargs['src_root'] = setup_python3()
13.17 File "/tmp/pip-install-f2p4v6n1/rdflib_977d0e9dfa1c4a449cab88b10d46a7ee/setup.py", line 30, in setup_python3
13.17 util.run_2to3(outfiles_2to3)
13.17 AttributeError: module 'distutils.util' has no attribute 'run_2to3'
13.17 [end of output]
13.17
13.17 note: This error originates from a subprocess, and is likely not a problem with pip.
13.18 error: metadata-generation-failed
Tried to replace it with a later version compatable with CKAN 2.10
#RUN pip3 install -e git+https://github.com/ckan/[email protected]#egg=ckanext-dcat && \
#pip3 install -r ${APP_DIR}/src/ckanext-dcat/requirements.txt && \
- then it builds fine, but when I add the extension in my .env folder I get a
PluginNotFound exception dcatwhen running Docker. Don't know what might be the problem ckan-dev-1 | 2024-05-25 14:05:05,953 INFO [ckan.config.environment] Loading templates from /srv/app/src/ckan/ckan/templates ckan-dev-1 | Traceback (most recent call last): ckan-dev-1 | File "/usr/bin/ckan", line 8, inckan-dev-1 | sys.exit(ckan()) ckan-dev-1 | File "/usr/lib/python3.10/site-packages/click/core.py", line 1130, in call ckan-dev-1 | return self.main(*args, **kwargs) ckan-dev-1 | File "/usr/lib/python3.10/site-packages/click/core.py", line 1054, in main ckan-dev-1 | with self.make_context(prog_name, args, **extra) as ctx: ckan-dev-1 | File "/usr/lib/python3.10/site-packages/click/core.py", line 920, in make_context ckan-dev-1 | self.parse_args(ctx, args) ckan-dev-1 | File "/srv/app/src/ckan/ckan/cli/cli.py", line 121, in parse_args ckan-dev-1 | result = super().parse_args(ctx, args) ckan-dev-1 | File "/usr/lib/python3.10/site-packages/click/core.py", line 1613, in parse_args ckan-dev-1 | rest = super().parse_args(ctx, args) ckan-dev-1 | File "/usr/lib/python3.10/site-packages/click/core.py", line 1378, in parse_args ckan-dev-1 | value, args = param.handle_parse_result(ctx, opts, args) ckan-dev-1 | File "/usr/lib/python3.10/site-packages/click/core.py", line 2360, in handle_parse_result ckan-dev-1 | value = self.process_value(ctx, value) ckan-dev-1 | File "/usr/lib/python3.10/site-packages/click/core.py", line 2322, in process_value ckan-dev-1 | value = self.callback(ctx, self, value) ckan-dev-1 | File "/srv/app/src/ckan/ckan/cli/cli.py", line 131, in _init_ckan_config ckan-dev-1 | _add_ctx_object(ctx, value) ckan-dev-1 | File "/srv/app/src/ckan/ckan/cli/cli.py", line 140, in _add_ctx_object ckan-dev-1 | ctx.obj = CtxObject(path) ckan-dev-1 | File "/srv/app/src/ckan/ckan/cli/cli.py", line 57, in init ckan-dev-1 | self.app = make_app(raw_config) ckan-dev-1 | File "/srv/app/src/ckan/ckan/config/middleware/init.py", line 27, in make_app ckan-dev-1 | load_environment(conf) ckan-dev-1 | File "/srv/app/src/ckan/ckan/config/environment.py", line 69, in load_environment ckan-dev-1 | p.load_all() ckan-dev-1 | File "/srv/app/src/ckan/ckan/plugins/core.py", line 222, in load_all ckan-dev-1 | load(*plugins) ckan-dev-1 | File "/srv/app/src/ckan/ckan/plugins/core.py", line 238, in load ckan-dev-1 | service = _get_service(plugin) ckan-dev-1 | File "/srv/app/src/ckan/ckan/plugins/core.py", line 346, in _get_service ckan-dev-1 | raise PluginNotFoundException(plugin_name) ckan-dev-1 | ckan.plugins.core.PluginNotFoundException: dcat ckan-dev-1 exited with code 0
I get the same problem when trying to install DOI
I've been getting the same error for all the CKAN extensions that I attempted to install. For now, I'm using the install from source method by relying on docker-compose.dev.yml and setting the SRC_EXTENSIONS_DIR environment variable to ${APP_DIR}/src
I've been getting the same error for all the CKAN extensions that I attempted to install. For now, I'm using the install from source method by relying on docker-compose.dev.yml and setting the SRC_EXTENSIONS_DIR environment variable to ${APP_DIR}/src
Please
Can you explain your solution? step by step
I have de same problem
thx
I've also encountered issues installing extensions (ckanext-scheming) in my case the documented way (via adding pip3 install commands in Dockerfile.dev). Since I've only had the problem in dev mode, I've taken advantage of the fact that the dev image also loads all plugins placed in the /src directory (this mechanism is supposed to be used for the custom extensions during development). So what I did successfully is:
- Don't try to install extensions via Dockerfile.dev
- Instead, download (or clone) the source code from the extension you're interested in directly from Github
- Move the downloaded directory under src (in my case, I had to rename it:
ckanext-scheming-release-3.1.0->ckanext-scheming) - Run
bin/install_srcso the extension is effectively installed - As usual, don't forget to add it to
CKAN__PLUGINSand run it viabin/compose up
I believe that's also how @vijaynyaya solved the issue, but I tried to be a bit more explanatory.