MISP / x_old_misp_docker

MISP Docker (XME edition)
283 stars 168 forks source link

import importlib.util errors durring docker-podman/podman-compose #98

Closed CloudArtAdmins closed 3 years ago

CloudArtAdmins commented 3 years ago

Both podman-compose and docker-compose when building. the end of the error shows "ModuleNotFoundError: No module named 'importlib.util'". I don't know if this is due to the install script and pip or the dockerfile, though.

I tried this on both Arch and Fedora 33. Each error in the same way for both files and both compose programs.

Full error: `Collecting importlib==1.0.4 Downloading importlib-1.0.4.zip (7.1 kB) ERROR: Command errored out with exit status 1: command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-t1b_apna/importlib_f13137b278354d878dc0c6584f5de5c2/setup.py'"'"'; file='"'"'/tmp/pip-install-t1b_apna/importlib_f13137b278354d878dc0c6584f5de5c2/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-vqfdkasu cwd: /tmp/pip-install-t1b_apna/importlib_f13137b278354d878dc0c6584f5de5c2/ Complete output (11 lines): Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python3.6/dist-packages/setuptools/init.py", line 10, in import distutils.core File "/usr/lib/python3.6/distutils/core.py", line 16, in from distutils.dist import Distribution File "/usr/lib/python3.6/distutils/dist.py", line 19, in from distutils.util import check_environ, strtobool, rfc822_escape File "/usr/lib/python3.6/distutils/util.py", line 9, in import importlib.util ModuleNotFoundError: No module named 'importlib.util'

ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output. ERROR: Service 'web' failed to build : The command '/bin/sh -c cd misp-modules && pip3 install --upgrade pip setuptools wheel && pip3 install scikit-build && pip3 install opencv-python && pip3 install -I -r REQUIREMENTS && pip3 install -I . && echo "sudo -u www-data misp-modules -s -l 127.0.0.1 &" >>/etc/rc.local' returned a non-zero code: 1`

kedrole commented 3 years ago

Try to replace "pip3" with "python3 -m pip" in web/Dockerfile.

CloudArtAdmins commented 3 years ago

Tried it. Had the same issue.

CloudArtAdmins commented 3 years ago

Most recent update to the file seems to have fixed it. It builds, now.