Я запускаю приложение фляги в Docker.Я также использую Панды.Я использую изображение python2.7-alpine.Раньше все работало нормально, т.е. я мог создавать образы с той же конфигурацией.
Но теперь я не могу построить образ, как он говорит:
ERROR: Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-Sm9A7D/pandas/
The command '/bin/sh -c pip install -r /tmp/requirements.txt' returned a non-zero code: 1
Я не могу изменить питонверсия.Поскольку мое приложение построено на python2 и было так, как и ожидалось, давно.
Мой Dockerfile
FROM python:2.7-alpine
RUN echo "ipv6" >> /etc/modules;
# echo "http://dl-cdn.alpinelinux.org/alpine/latest-stable/main" > /etc/apk/repositories; \
# echo "http://dl-cdn.alpinelinux.org/alpine/latest-stable/community" >> /etc/apk/repositories; \
# echo "http://dl-2.alpinelinux.org/alpine/latest-stable/community" >> /etc/apk/repositories; \
# echo "http://dl-3.alpinelinux.org/alpine/latest-stable/community" >> /etc/apk/repositories; \
# echo "http://dl-4.alpinelinux.org/alpine/latest-stable/community" >> /etc/apk/repositories; \
# echo "http://dl-5.alpinelinux.org/alpine/latest-stable/community" >> /etc/apk/repositories
RUN rm -rf /var/cache/apk/* && \
rm -rf /tmp/* && \
apk update && \
apk add --update bash sudo
#================================================================
# add dependencies
#================================================================
RUN apk add --update --no-cache g++ gcc libffi-dev make gpgme p11-kit openssl-dev openssh
#================================================================
# pip and required modules install
#================================================================
### Upgrade pip to prevent errors
RUN pip install setuptools --upgrade
ADD requirements.txt /tmp/requirements.txt
RUN pip install -r /tmp/requirements.txt
Полный трек ошибок:
ERROR: Complete output from command python setup.py egg_info:
ERROR: Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-Sm9A7D/pandas/setup.py", line 749, in <module>
**setuptools_kwargs)
File "/usr/local/lib/python2.7/site-packages/setuptools/__init__.py", line 144, in setup
_install_setup_requires(attrs)
File "/usr/local/lib/python2.7/site-packages/setuptools/__init__.py", line 139, in _install_setup_requires
dist.fetch_build_eggs(dist.setup_requires)
File "/usr/local/lib/python2.7/site-packages/setuptools/dist.py", line 717, in fetch_build_eggs
replace_conflicting=True,
File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 782, in resolve
replace_conflicting=replace_conflicting
File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1065, in best_match
return self.obtain(req, installer)
File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1077, in obtain
return installer(requirement)
File "/usr/local/lib/python2.7/site-packages/setuptools/dist.py", line 784, in fetch_build_egg
return cmd.easy_install(req)
File "/usr/local/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 679, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "/usr/local/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 705, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "/usr/local/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 890, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "/usr/local/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1158, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "/usr/local/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1144, in run_setup
run_setup(setup_script, args)
File "/usr/local/lib/python2.7/site-packages/setuptools/sandbox.py", line 253, in run_setup
raise
File "/usr/local/lib/python2.7/contextlib.py", line 35, in __exit__
self.gen.throw(type, value, traceback)
File "/usr/local/lib/python2.7/site-packages/setuptools/sandbox.py", line 195, in setup_context
yield
File "/usr/local/lib/python2.7/contextlib.py", line 35, in __exit__
self.gen.throw(type, value, traceback)
File "/usr/local/lib/python2.7/site-packages/setuptools/sandbox.py", line 166, in save_modules
saved_exc.resume()
File "/usr/local/lib/python2.7/site-packages/setuptools/sandbox.py", line 141, in resume
six.reraise(type, exc, self._tb)
File "/usr/local/lib/python2.7/site-packages/setuptools/sandbox.py", line 154, in save_modules
yield saved
File "/usr/local/lib/python2.7/site-packages/setuptools/sandbox.py", line 195, in setup_context
yield
File "/usr/local/lib/python2.7/site-packages/setuptools/sandbox.py", line 250, in run_setup
_execfile(setup_script, ns)
File "/usr/local/lib/python2.7/site-packages/setuptools/sandbox.py", line 45, in _execfile
exec(code, globals, locals)
File "/tmp/easy_install-2BV0tR/numpy-1.17.0rc1/setup.py", line 31, in <module>
def is_platform_mac():
RuntimeError: Python version >= 3.5 required.
----------------------------------------
ERROR: Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-Sm9A7D/pandas/
The command '/bin/sh -c pip install -r /tmp/requirements.txt' returned a non-zero code: 1