I can run the project on my local MAC, but when I use the pipeline to build it. I got this error: Command “python setup.py egg_info” failed with error code 1 in /tmp/pip-build-axjgd0da/MarkupSafe/
This project is working well, and I did not update any new lib in it. Even I redeployed to the old branch, it has the same error.
Here are the build logs:
Collecting MarkupSafe==2.1.0 (from -r /usr/src/app/requirements.txt (line 1)) Downloading https://files.pythonhosted.org/packages/62/0f/52c009332fdadd484e898dc8f2acca0663c1031b3517070fd34ad9c1b64e/MarkupSafe-2.1.0.tar.gz Complete output from command python setup.py egg_info: Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-build-axjgd0da/MarkupSafe/setup.py", line 65, in <module> run_setup(True) File "/tmp/pip-build-axjgd0da/MarkupSafe/setup.py", line 44, in run_setup ext_modules=ext_modules if with_binary else [], File "/usr/lib/python3.7/site-packages/setuptools/__init__.py", line 129, in setup return distutils.core.setup(**attrs) File "/usr/lib64/python3.7/distutils/core.py", line 121, in setup dist.parse_config_files() File "/usr/lib/python3.7/site-packages/setuptools/dist.py", line 442, in parse_config_files ignore_option_errors=ignore_option_errors) File "/usr/lib/python3.7/site-packages/setuptools/config.py", line 106, in parse_configuration meta.parse() File "/usr/lib/python3.7/site-packages/setuptools/config.py", line 382, in parse section_parser_method(section_options) File "/usr/lib/python3.7/site-packages/setuptools/config.py", line 355, in parse_section self[name] = value File "/usr/lib/python3.7/site-packages/setuptools/config.py", line 173, in __setitem__ value = parser(value) File "/usr/lib/python3.7/site-packages/setuptools/config.py", line 430, in _parse_version version = self._parse_attr(value) File "/usr/lib/python3.7/site-packages/setuptools/config.py", line 305, in _parse_attr module = import_module(module_name) File "/usr/lib64/python3.7/importlib/__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1006, in _gcd_import File "<frozen importlib._bootstrap>", line 983, in _find_and_load File "<frozen importlib._bootstrap>", line 965, in _find_and_load_unlocked ModuleNotFoundError: No module named 'markupsafe' ---------------------------------------- Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-axjgd0da/MarkupSafe/ The command '/bin/sh -c pip3 install -r $DOCKER_APP_HOME/requirements.txt' returned a non-zero code: 1 make: *** [docker-build] Error 1
Advertisement
Answer
It is a version problem.
The current version is 2.1.0, which I downgraded to Markupsafe==2.0.1. I added the “Markupsafe==2.0.1” in the requirements.txt, then I don’t have the problem anymore.