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:
JavaScript
x
150
150
1
Collecting MarkupSafe==2.1.0 (from -r /usr/src/app/requirements.txt (line 1))
2
3
4
5
Downloading https://files.pythonhosted.org/packages/62/0f/52c009332fdadd484e898dc8f2acca0663c1031b3517070fd34ad9c1b64e/MarkupSafe-2.1.0.tar.gz
6
7
8
9
Complete output from command python setup.py egg_info:
10
11
12
13
Traceback (most recent call last):
14
15
16
17
File "<string>", line 1, in <module>
18
19
20
21
File "/tmp/pip-build-axjgd0da/MarkupSafe/setup.py", line 65, in <module>
22
23
24
25
run_setup(True)
26
27
28
29
File "/tmp/pip-build-axjgd0da/MarkupSafe/setup.py", line 44, in run_setup
30
31
32
33
ext_modules=ext_modules if with_binary else [],
34
35
36
37
File "/usr/lib/python3.7/site-packages/setuptools/__init__.py", line 129, in setup
38
39
40
41
return distutils.core.setup(**attrs)
42
43
44
45
File "/usr/lib64/python3.7/distutils/core.py", line 121, in setup
46
47
48
49
dist.parse_config_files()
50
51
52
53
File "/usr/lib/python3.7/site-packages/setuptools/dist.py", line 442, in parse_config_files
54
55
56
57
ignore_option_errors=ignore_option_errors)
58
59
60
61
File "/usr/lib/python3.7/site-packages/setuptools/config.py", line 106, in parse_configuration
62
63
64
65
meta.parse()
66
67
68
69
File "/usr/lib/python3.7/site-packages/setuptools/config.py", line 382, in parse
70
71
72
73
section_parser_method(section_options)
74
75
76
77
File "/usr/lib/python3.7/site-packages/setuptools/config.py", line 355, in parse_section
78
79
80
81
self[name] = value
82
83
84
85
File "/usr/lib/python3.7/site-packages/setuptools/config.py", line 173, in __setitem__
86
87
88
89
value = parser(value)
90
91
92
93
File "/usr/lib/python3.7/site-packages/setuptools/config.py", line 430, in _parse_version
94
95
96
97
version = self._parse_attr(value)
98
99
100
101
File "/usr/lib/python3.7/site-packages/setuptools/config.py", line 305, in _parse_attr
102
103
104
105
module = import_module(module_name)
106
107
108
109
File "/usr/lib64/python3.7/importlib/__init__.py", line 127, in import_module
110
111
112
113
return _bootstrap._gcd_import(name[level:], package, level)
114
115
116
117
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
118
119
120
121
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
122
123
124
125
File "<frozen importlib._bootstrap>", line 965, in _find_and_load_unlocked
126
127
128
129
ModuleNotFoundError: No module named 'markupsafe'
130
131
132
133
134
135
136
137
----------------------------------------
138
139
140
141
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-axjgd0da/MarkupSafe/
142
143
144
145
The command '/bin/sh -c pip3 install -r $DOCKER_APP_HOME/requirements.txt' returned a non-zero code: 1
146
147
148
149
make: *** [docker-build] Error 1
150
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.