openfaas / faas

OpenFaaS - Serverless Functions Made Simple
https://www.openfaas.com
MIT License
25.02k stars 1.93k forks source link

Can't install and import `pandas` on `python3`/`python3-http` templates #1600

Closed adityamookerjee closed 3 years ago

adityamookerjee commented 3 years ago

My actions before raising this issue

I've been trying to spin up a simple function that will use the Pandas library. I've added pandas to requirements.txt and imported it in handler.py However I get the following traceback when I run faas-cli up

Expected Behaviour

Current Behaviour

Errors received during build:
- [test] received non-zero exit code from build, error: #1 [internal] load .dockerignore
#1 sha256:c76785fc49b6e457689c5a33d731f32f867f11e956186c7e94e92570a457ddca
#1 transferring context: 2B done
#1 DONE 0.0s

#2 [internal] load build definition from Dockerfile
#2 sha256:e4b7abf7a0b57605c70b0ebb9878cd78359da1e947090e14e15d92238b10ebdb
#2 transferring dockerfile: 1.31kB done
#2 DONE 0.0s

#4 [internal] load metadata for docker.io/openfaas/classic-watchdog:0.18.18
#4 sha256:82088a95ac9feceec4cab7ad4422d560f5b55753d4aabd60efbd385ab15b2366
#4 DONE 1.0s

#3 [internal] load metadata for docker.io/library/python:3-alpine
#3 sha256:5cfd63f819a536533ccd33ab472b68bc5eaf5534980201cfb2f10a631818880f
#3 DONE 1.4s

#6 [watchdog 1/1] FROM docker.io/openfaas/classic-watchdog:0.18.18@sha256:6acaf3172e105177b1a6152aa75f0b2774e2330a6d505ac074e4dd571df273ae
#6 sha256:392e6c0b9adeb3d6266aa06ab5bbab154da11d7edc3696f0ba5b25671959b46e
#6 CACHED

#12 [internal] load build context
#12 sha256:05b04c8cae6954d72c4839505d47c47dc37d0c9411e281eb5790e9b8c04e6431
#12 transferring context: 937B done
#12 DONE 0.0s

#5 [stage-1  1/18] FROM docker.io/library/python:3-alpine@sha256:4228f7566ffd3fcdcf1ce2720a109994395a39450c0005bdb70864f57abfc25d
#5 sha256:46e082ca5204805e3a44b349a1894a1a7732a28a8e7c9d02f4a752fde78e88de
#5 resolve docker.io/library/python:3-alpine@sha256:4228f7566ffd3fcdcf1ce2720a109994395a39450c0005bdb70864f57abfc25d done
#5 sha256:d9fc4dd5c37b5e49f8cc5610fc6283f49e6fd6315093319ea9ac4c9b78f4977a 0B / 653.69kB 0.1s
#5 sha256:8e2102c9ae14c9961daebee03b3d1d56ca27167a8e557f3fe8b89e5da23df7a0 0B / 13.36MB 0.1s
#5 sha256:ce0fde1153f7c7f21c18e5c3f4d7120ea69879dafbb69b7d312c53936adfade8 0B / 230B 0.1s
#5 sha256:4228f7566ffd3fcdcf1ce2720a109994395a39450c0005bdb70864f57abfc25d 1.65kB / 1.65kB done
#5 sha256:fafb7be199cd058dc78f69dc34b4d06317fd642ae3079cf024f99e0f5a405bc0 1.37kB / 1.37kB done
#5 sha256:bcab265f799752f405e7626395000f7d35185ef8a0abb5e5970dcb634256dc4f 7.15kB / 7.15kB done
#5 sha256:188c0c94c7c576fff0792aca7ec73d67a2f7f4cb3a6e53a84559337260b36964 2.80MB / 2.80MB done
#5 sha256:ce0fde1153f7c7f21c18e5c3f4d7120ea69879dafbb69b7d312c53936adfade8 230B / 230B 0.2s done
#5 sha256:7e05902c65ea0099b826547ab64b3071cd4ea01d99477e5d51cb9a1309752a7e 0B / 2.12MB 0.2s
#5 sha256:d9fc4dd5c37b5e49f8cc5610fc6283f49e6fd6315093319ea9ac4c9b78f4977a 653.69kB / 653.69kB 0.3s done
#5 extracting sha256:d9fc4dd5c37b5e49f8cc5610fc6283f49e6fd6315093319ea9ac4c9b78f4977a
#5 extracting sha256:d9fc4dd5c37b5e49f8cc5610fc6283f49e6fd6315093319ea9ac4c9b78f4977a 0.2s done
#5 sha256:8e2102c9ae14c9961daebee03b3d1d56ca27167a8e557f3fe8b89e5da23df7a0 1.74MB / 13.36MB 0.6s
#5 sha256:7e05902c65ea0099b826547ab64b3071cd4ea01d99477e5d51cb9a1309752a7e 172.30kB / 2.12MB 0.6s
#5 sha256:8e2102c9ae14c9961daebee03b3d1d56ca27167a8e557f3fe8b89e5da23df7a0 3.03MB / 13.36MB 0.8s
#5 sha256:7e05902c65ea0099b826547ab64b3071cd4ea01d99477e5d51cb9a1309752a7e 409.60kB / 2.12MB 0.8s
#5 sha256:8e2102c9ae14c9961daebee03b3d1d56ca27167a8e557f3fe8b89e5da23df7a0 4.36MB / 13.36MB 0.9s
#5 sha256:7e05902c65ea0099b826547ab64b3071cd4ea01d99477e5d51cb9a1309752a7e 682.47kB / 2.12MB 0.9s
#5 sha256:7e05902c65ea0099b826547ab64b3071cd4ea01d99477e5d51cb9a1309752a7e 911.84kB / 2.12MB 1.0s
#5 sha256:8e2102c9ae14c9961daebee03b3d1d56ca27167a8e557f3fe8b89e5da23df7a0 6.89MB / 13.36MB 1.2s
#5 sha256:7e05902c65ea0099b826547ab64b3071cd4ea01d99477e5d51cb9a1309752a7e 1.37MB / 2.12MB 1.2s
#5 sha256:8e2102c9ae14c9961daebee03b3d1d56ca27167a8e557f3fe8b89e5da23df7a0 8.13MB / 13.36MB 1.3s
#5 sha256:7e05902c65ea0099b826547ab64b3071cd4ea01d99477e5d51cb9a1309752a7e 1.69MB / 2.12MB 1.3s
#5 sha256:8e2102c9ae14c9961daebee03b3d1d56ca27167a8e557f3fe8b89e5da23df7a0 10.37MB / 13.36MB 1.5s
#5 sha256:7e05902c65ea0099b826547ab64b3071cd4ea01d99477e5d51cb9a1309752a7e 2.12MB / 2.12MB 1.5s done
#5 sha256:8e2102c9ae14c9961daebee03b3d1d56ca27167a8e557f3fe8b89e5da23df7a0 11.37MB / 13.36MB 1.6s
#5 sha256:8e2102c9ae14c9961daebee03b3d1d56ca27167a8e557f3fe8b89e5da23df7a0 13.36MB / 13.36MB 1.7s done
#5 extracting sha256:8e2102c9ae14c9961daebee03b3d1d56ca27167a8e557f3fe8b89e5da23df7a0
#5 extracting sha256:8e2102c9ae14c9961daebee03b3d1d56ca27167a8e557f3fe8b89e5da23df7a0 0.5s done
#5 extracting sha256:ce0fde1153f7c7f21c18e5c3f4d7120ea69879dafbb69b7d312c53936adfade8 done
#5 extracting sha256:7e05902c65ea0099b826547ab64b3071cd4ea01d99477e5d51cb9a1309752a7e
#5 extracting sha256:7e05902c65ea0099b826547ab64b3071cd4ea01d99477e5d51cb9a1309752a7e 0.2s done
#5 DONE 2.6s

#7 [stage-1  2/18] COPY --from=watchdog /fwatchdog /usr/bin/fwatchdog
#7 sha256:10338b8c288a99a97dcde16e9c81340d6c8470d1916544da4fd555ff45f3d0f0
#7 DONE 0.2s

#8 [stage-1  3/18] RUN chmod +x /usr/bin/fwatchdog
#8 sha256:fc9b8d73dd91baab816c082669102889d55b2dabf6c582c3d9eeb7ea363d27ba
#8 DONE 0.3s

#9 [stage-1  4/18] RUN apk --no-cache add ca-certificates ${ADDITIONAL_PACKAGE}
#9 sha256:7276f3a9e73f0d027d7cbab84a8aeaaec6ad8bc30cd94fa4a4b4ef0a68e14d54
#9 0.225 fetch http://dl-cdn.alpinelinux.org/alpine/v3.12/main/x86_64/APKINDEX.tar.gz
#9 0.477 fetch http://dl-cdn.alpinelinux.org/alpine/v3.12/community/x86_64/APKINDEX.tar.gz
#9 0.734 OK: 15 MiB in 36 packages
#9 DONE 0.8s

#10 [stage-1  5/18] RUN addgroup -S app && adduser app -S -G app
#10 sha256:6b0d196a65b6f9fbf77f88777f8c1e0ddfa1195cbb246ce8b48f947afa513413
#10 DONE 0.3s

#11 [stage-1  6/18] WORKDIR /home/app/
#11 sha256:c4b39d1da06f9afdb059d26fc88d3b2e527adfd551b16f4a2cd43d99e64bf0e2
#11 DONE 0.0s

#13 [stage-1  7/18] COPY index.py           .
#13 sha256:739f68c064568671047053b7a1ebee46b6fafb4af0da2144009946afb7b30431
#13 DONE 0.0s

#14 [stage-1  8/18] COPY requirements.txt   .
#14 sha256:f11973cac5b0e7c5abdbf6fd30446c183b1df4120f16b6a013859e3cb3ca975e
#14 DONE 0.0s

#15 [stage-1  9/18] RUN chown -R app /home/app &&   mkdir -p /home/app/python && chown -R app /home/app
#15 sha256:a1f09af0b8934c75d78d2097df5c818908943052e442dfa0b2a7f976d6bcb431
#15 DONE 0.2s

#16 [stage-1 10/18] RUN pip install -r requirements.txt --target=/home/app/python
#16 sha256:875173309117578d48a7ff1e7d0a7718aebe33f60ebbd9454451e9fb0d76593e
#16 DONE 1.9s

#17 [stage-1 11/18] RUN mkdir -p function
#17 sha256:74037e4f69c014ba2c5482129b9fafb7bad499855bc758784b416fc0862624c6
#17 DONE 0.2s

#18 [stage-1 12/18] RUN touch ./function/__init__.py
#18 sha256:130ab409be75d8d09aa58bf266ade06b4c6e05724e68d71cf645116b91e8ce4b
#18 DONE 0.2s

#19 [stage-1 13/18] WORKDIR /home/app/function/
#19 sha256:23a1ec09f1c91fb87cf00e7b37d3a4209d7d3eab86eebc591461e8ed7f319f4f
#19 DONE 0.0s

#20 [stage-1 14/18] COPY function/requirements.txt  .
#20 sha256:92d7f6e3b24c6ef02b8177bfe70903ba64487b5b0f0e4b7b440d10eac4394f5f
#20 DONE 0.0s

#21 [stage-1 15/18] RUN pip install -r requirements.txt --target=/home/app/python
#21 sha256:6121c190bed1ffeee5b5865ecc6149dd9e93b0c6e6447d6a48be51716b4f6a28
#21 2.129 Collecting pandas
#21 2.260   Downloading pandas-1.1.4.tar.gz (5.2 MB)
#21 3.481   Installing build dependencies: started
#21 38.97   Installing build dependencies: finished with status 'error'
#21 38.97   ERROR: Command errored out with exit status 1:
#21 38.97    command: /usr/local/bin/python /usr/local/lib/python3.9/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-v5785w0c/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel 'Cython>=0.29.21,<3' 'numpy==1.15.4; python_version=='"'"'3.6'"'"' and platform_system!='"'"'AIX'"'"'' 'numpy==1.15.4; python_version=='"'"'3.7'"'"' and platform_system!='"'"'AIX'"'"'' 'numpy==1.17.3; python_version=='"'"'3.8'"'"' and platform_system!='"'"'AIX'"'"'' 'numpy==1.16.0; python_version=='"'"'3.6'"'"' and platform_system=='"'"'AIX'"'"'' 'numpy==1.16.0; python_version=='"'"'3.7'"'"' and platform_system=='"'"'AIX'"'"'' 'numpy==1.17.3; python_version=='"'"'3.8'"'"' and platform_system=='"'"'AIX'"'"'' 'numpy; python_version>='"'"'3.9'"'"''
#21 38.97        cwd: None
#21 38.97   Complete output (254 lines):
#21 38.97   Ignoring numpy: markers 'python_version == "3.6" and platform_system != "AIX"' don't match your environment
#21 38.97   Ignoring numpy: markers 'python_version == "3.7" and platform_system != "AIX"' don't match your environment
#21 38.97   Ignoring numpy: markers 'python_version == "3.8" and platform_system != "AIX"' don't match your environment
#21 38.97   Ignoring numpy: markers 'python_version == "3.6" and platform_system == "AIX"' don't match your environment
#21 38.97   Ignoring numpy: markers 'python_version == "3.7" and platform_system == "AIX"' don't match your environment
#21 38.97   Ignoring numpy: markers 'python_version == "3.8" and platform_system == "AIX"' don't match your environment
#21 38.97   Collecting setuptools
#21 38.97     Downloading setuptools-50.3.2-py3-none-any.whl (785 kB)
#21 38.97   Collecting wheel
#21 38.97     Downloading wheel-0.35.1-py2.py3-none-any.whl (33 kB)
#21 38.97   Collecting Cython<3,>=0.29.21
#21 38.97     Downloading Cython-0.29.21-py2.py3-none-any.whl (974 kB)
#21 38.97   Collecting numpy
#21 38.97     Downloading numpy-1.19.4.zip (7.3 MB)
#21 38.97     Installing build dependencies: started
#21 38.97     Installing build dependencies: finished with status 'done'
#21 38.97     Getting requirements to build wheel: started
#21 38.97     Getting requirements to build wheel: finished with status 'done'
#21 38.97       Preparing wheel metadata: started
#21 38.97       Preparing wheel metadata: finished with status 'error'
#21 38.97       ERROR: Command errored out with exit status 1:
#21 38.97        command: /usr/local/bin/python /usr/local/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /tmp/tmpyfsnbwbb
#21 38.97            cwd: /tmp/pip-install-yz3g4ty8/numpy
#21 38.97       Complete output (228 lines):
#21 38.97       Running from numpy source directory.
#21 38.97       setup.py:480: UserWarning: Unrecognized setuptools command, proceeding with generating Cython sources and expanding templates
#21 38.97         run_build = parse_setuppy_commands()
#21 38.97       Processing numpy/random/_bounded_integers.pxd.in
#21 38.97       Processing numpy/random/_generator.pyx
#21 38.97       Processing numpy/random/bit_generator.pyx
#21 38.97       Processing numpy/random/mtrand.pyx
#21 38.97       Processing numpy/random/_philox.pyx
#21 38.97       Processing numpy/random/_sfc64.pyx
#21 38.97       Processing numpy/random/_mt19937.pyx
#21 38.97       Processing numpy/random/_pcg64.pyx
#21 38.97       Processing numpy/random/_common.pyx
#21 38.97       Processing numpy/random/_bounded_integers.pyx.in
#21 38.97       Cythonizing sources
#21 38.97       blas_opt_info:
#21 38.97       blas_mkl_info:
#21 38.97       customize UnixCCompiler
#21 38.97         libraries mkl_rt not found in ['/usr/local/lib', '/usr/lib']
#21 38.97         NOT AVAILABLE
#21 38.97
#21 38.97       blis_info:
#21 38.97         libraries blis not found in ['/usr/local/lib', '/usr/lib']
#21 38.97         NOT AVAILABLE
#21 38.97
#21 38.97       openblas_info:
#21 38.97         libraries openblas not found in ['/usr/local/lib', '/usr/lib']
#21 38.97         NOT AVAILABLE
#21 38.97
#21 38.97       atlas_3_10_blas_threads_info:
#21 38.97       Setting PTATLAS=ATLAS
#21 38.97         libraries tatlas not found in ['/usr/local/lib', '/usr/lib']
#21 38.97         NOT AVAILABLE
#21 38.97
#21 38.97       atlas_3_10_blas_info:
#21 38.97         libraries satlas not found in ['/usr/local/lib', '/usr/lib']
#21 38.97         NOT AVAILABLE
#21 38.97
#21 38.97       atlas_blas_threads_info:
#21 38.97       Setting PTATLAS=ATLAS
#21 38.97         libraries ptf77blas,ptcblas,atlas not found in ['/usr/local/lib', '/usr/lib']
#21 38.97         NOT AVAILABLE
#21 38.97
#21 38.97       atlas_blas_info:
#21 38.97         libraries f77blas,cblas,atlas not found in ['/usr/local/lib', '/usr/lib']
#21 38.97         NOT AVAILABLE
#21 38.97
#21 38.97       accelerate_info:
#21 38.97         NOT AVAILABLE
#21 38.97
#21 38.97       /tmp/pip-install-yz3g4ty8/numpy/numpy/distutils/system_info.py:1914: UserWarning:
#21 38.97           Optimized (vendor) Blas libraries are not found.
#21 38.97           Falls back to netlib Blas library which has worse performance.
#21 38.97           A better performance should be easily gained by switching
#21 38.97           Blas library.
#21 38.97         if self._calc_info(blas):
#21 38.97       blas_info:
#21 38.97         libraries blas not found in ['/usr/local/lib', '/usr/lib']
#21 38.97         NOT AVAILABLE
#21 38.97
#21 38.97       /tmp/pip-install-yz3g4ty8/numpy/numpy/distutils/system_info.py:1914: UserWarning:
#21 38.97           Blas (http://www.netlib.org/blas/) libraries not found.
#21 38.97           Directories to search for the libraries can be specified in the
#21 38.97           numpy/distutils/site.cfg file (section [blas]) or by setting
#21 38.97           the BLAS environment variable.
#21 38.97         if self._calc_info(blas):
#21 38.97       blas_src_info:
#21 38.97         NOT AVAILABLE
#21 38.97
#21 38.97       /tmp/pip-install-yz3g4ty8/numpy/numpy/distutils/system_info.py:1914: UserWarning:
#21 38.97           Blas (http://www.netlib.org/blas/) sources not found.
#21 38.97           Directories to search for the sources can be specified in the
#21 38.97           numpy/distutils/site.cfg file (section [blas_src]) or by setting
#21 38.97           the BLAS_SRC environment variable.
#21 38.97         if self._calc_info(blas):
#21 38.97         NOT AVAILABLE
#21 38.97
#21 38.97       non-existing path in 'numpy/distutils': 'site.cfg'
#21 38.97       lapack_opt_info:
#21 38.97       lapack_mkl_info:
#21 38.97         libraries mkl_rt not found in ['/usr/local/lib', '/usr/lib']
#21 38.97         NOT AVAILABLE
#21 38.97
#21 38.97       openblas_lapack_info:
#21 38.97         libraries openblas not found in ['/usr/local/lib', '/usr/lib']
#21 38.97         NOT AVAILABLE
#21 38.97
#21 38.97       openblas_clapack_info:
#21 38.97         libraries openblas,lapack not found in ['/usr/local/lib', '/usr/lib']
#21 38.97         NOT AVAILABLE
#21 38.97
#21 38.97       flame_info:
#21 38.97         libraries flame not found in ['/usr/local/lib', '/usr/lib']
#21 38.97         NOT AVAILABLE
#21 38.97
#21 38.97       atlas_3_10_threads_info:
#21 38.97       Setting PTATLAS=ATLAS
#21 38.97         libraries lapack_atlas not found in /usr/local/lib
#21 38.97         libraries tatlas,tatlas not found in /usr/local/lib
#21 38.97         libraries lapack_atlas not found in /usr/lib
#21 38.97         libraries tatlas,tatlas not found in /usr/lib
#21 38.97       <class 'numpy.distutils.system_info.atlas_3_10_threads_info'>
#21 38.97         NOT AVAILABLE
#21 38.97
#21 38.97       atlas_3_10_info:
#21 38.97         libraries lapack_atlas not found in /usr/local/lib
#21 38.97         libraries satlas,satlas not found in /usr/local/lib
#21 38.97         libraries lapack_atlas not found in /usr/lib
#21 38.97         libraries satlas,satlas not found in /usr/lib
#21 38.97       <class 'numpy.distutils.system_info.atlas_3_10_info'>
#21 38.97         NOT AVAILABLE
#21 38.97
#21 38.97       atlas_threads_info:
#21 38.97       Setting PTATLAS=ATLAS
#21 38.97         libraries lapack_atlas not found in /usr/local/lib
#21 38.97         libraries ptf77blas,ptcblas,atlas not found in /usr/local/lib
#21 38.97         libraries lapack_atlas not found in /usr/lib
#21 38.97         libraries ptf77blas,ptcblas,atlas not found in /usr/lib
#21 38.97       <class 'numpy.distutils.system_info.atlas_threads_info'>
#21 38.97         NOT AVAILABLE
#21 38.97
#21 38.97       atlas_info:
#21 38.97         libraries lapack_atlas not found in /usr/local/lib
#21 38.97         libraries f77blas,cblas,atlas not found in /usr/local/lib
#21 38.97         libraries lapack_atlas not found in /usr/lib
#21 38.97         libraries f77blas,cblas,atlas not found in /usr/lib
#21 38.97       <class 'numpy.distutils.system_info.atlas_info'>
#21 38.97         NOT AVAILABLE
#21 38.97
#21 38.97       lapack_info:
#21 38.97         libraries lapack not found in ['/usr/local/lib', '/usr/lib']
#21 38.97         NOT AVAILABLE
#21 38.97
#21 38.97       /tmp/pip-install-yz3g4ty8/numpy/numpy/distutils/system_info.py:1748: UserWarning:
#21 38.97           Lapack (http://www.netlib.org/lapack/) libraries not found.
#21 38.97           Directories to search for the libraries can be specified in the
#21 38.97           numpy/distutils/site.cfg file (section [lapack]) or by setting
#21 38.97           the LAPACK environment variable.
#21 38.97         return getattr(self, '_calc_info_{}'.format(name))()
#21 38.97       lapack_src_info:
#21 38.97         NOT AVAILABLE
#21 38.97
#21 38.97       /tmp/pip-install-yz3g4ty8/numpy/numpy/distutils/system_info.py:1748: UserWarning:
#21 38.97           Lapack (http://www.netlib.org/lapack/) sources not found.
#21 38.97           Directories to search for the sources can be specified in the
#21 38.97           numpy/distutils/site.cfg file (section [lapack_src]) or by setting
#21 38.97           the LAPACK_SRC environment variable.
#21 38.97         return getattr(self, '_calc_info_{}'.format(name))()
#21 38.97         NOT AVAILABLE
#21 38.97
#21 38.97       numpy_linalg_lapack_lite:
#21 38.97         FOUND:
#21 38.97           language = c
#21 38.97           define_macros = [('HAVE_BLAS_ILP64', None), ('BLAS_SYMBOL_SUFFIX', '64_')]
#21 38.97
#21 38.97       /usr/local/lib/python3.9/distutils/dist.py:274: UserWarning: Unknown distribution option: 'define_macros'
#21 38.97         warnings.warn(msg)
#21 38.97       running dist_info
#21 38.97       running build_src
#21 38.97       build_src
#21 38.97       building py_modules sources
#21 38.97       creating build
#21 38.97       creating build/src.linux-x86_64-3.9
#21 38.97       creating build/src.linux-x86_64-3.9/numpy
#21 38.97       creating build/src.linux-x86_64-3.9/numpy/distutils
#21 38.97       building library "npymath" sources
#21 38.97       Could not locate executable gfortran
#21 38.97       Could not locate executable f95
#21 38.97       Could not locate executable ifort
#21 38.97       Could not locate executable ifc
#21 38.97       Could not locate executable lf95
#21 38.97       Could not locate executable pgfortran
#21 38.97       Could not locate executable nvfortran
#21 38.97       Could not locate executable f90
#21 38.97       Could not locate executable f77
#21 38.97       Could not locate executable fort
#21 38.97       Could not locate executable efort
#21 38.97       Could not locate executable efc
#21 38.97       Could not locate executable g77
#21 38.97       Could not locate executable g95
#21 38.97       Could not locate executable pathf95
#21 38.97       Could not locate executable nagfor
#21 38.97       don't know how to compile Fortran code on platform 'posix'
#21 38.97       Traceback (most recent call last):
#21 38.97         File "/usr/local/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py", line 280, in <module>
#21 38.97           main()
#21 38.97         File "/usr/local/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py", line 263, in main
#21 38.97           json_out['return_val'] = hook(**hook_input['kwargs'])
#21 38.97         File "/usr/local/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py", line 133, in prepare_metadata_for_build_wheel
#21 38.97           return hook(metadata_directory, config_settings)
#21 38.97         File "/tmp/pip-build-env-rdb65f1x/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 157, in prepare_metadata_for_build_wheel
#21 38.97           self.run_setup()
#21 38.97         File "/tmp/pip-build-env-rdb65f1x/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 248, in run_setup
#21 38.97           super(_BuildMetaLegacyBackend,
#21 38.97         File "/tmp/pip-build-env-rdb65f1x/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 142, in run_setup
#21 38.97           exec(compile(code, __file__, 'exec'), locals())
#21 38.97         File "setup.py", line 508, in <module>
#21 38.97           setup_package()
#21 38.97         File "setup.py", line 500, in setup_package
#21 38.97           setup(**metadata)
#21 38.97         File "/tmp/pip-install-yz3g4ty8/numpy/numpy/distutils/core.py", line 169, in setup
#21 38.97           return old_setup(**new_attr)
#21 38.97         File "/tmp/pip-build-env-rdb65f1x/overlay/lib/python3.9/site-packages/setuptools/__init__.py", line 165, in setup
#21 38.97           return distutils.core.setup(**attrs)
#21 38.97         File "/usr/local/lib/python3.9/distutils/core.py", line 148, in setup
#21 38.97           dist.run_commands()
#21 38.97         File "/usr/local/lib/python3.9/distutils/dist.py", line 966, in run_commands
#21 38.97           self.run_command(cmd)
#21 38.97         File "/usr/local/lib/python3.9/distutils/dist.py", line 985, in run_command
#21 38.97           cmd_obj.run()
#21 38.97         File "/tmp/pip-build-env-rdb65f1x/overlay/lib/python3.9/site-packages/setuptools/command/dist_info.py", line 31, in run
#21 38.97           egg_info.run()
#21 38.97         File "/tmp/pip-install-yz3g4ty8/numpy/numpy/distutils/command/egg_info.py", line 24, in run
#21 38.97           self.run_command("build_src")
#21 38.97         File "/usr/local/lib/python3.9/distutils/cmd.py", line 313, in run_command
#21 38.97           self.distribution.run_command(command)
#21 38.97         File "/usr/local/lib/python3.9/distutils/dist.py", line 985, in run_command
#21 38.97           cmd_obj.run()
#21 38.97         File "/tmp/pip-install-yz3g4ty8/numpy/numpy/distutils/command/build_src.py", line 144, in run
#21 38.97           self.build_sources()
#21 38.97         File "/tmp/pip-install-yz3g4ty8/numpy/numpy/distutils/command/build_src.py", line 155, in build_sources
#21 38.97           self.build_library_sources(*libname_info)
#21 38.97         File "/tmp/pip-install-yz3g4ty8/numpy/numpy/distutils/command/build_src.py", line 288, in build_library_sources
#21 38.97           sources = self.generate_sources(sources, (lib_name, build_info))
#21 38.97         File "/tmp/pip-install-yz3g4ty8/numpy/numpy/distutils/command/build_src.py", line 378, in generate_sources
#21 38.97           source = func(extension, build_dir)
#21 38.97         File "numpy/core/setup.py", line 663, in get_mathlib_info
#21 38.97           raise RuntimeError("Broken toolchain: cannot link a simple C program")
#21 38.97       RuntimeError: Broken toolchain: cannot link a simple C program
#21 38.97       ----------------------------------------
#21 38.97   ERROR: Command errored out with exit status 1: /usr/local/bin/python /usr/local/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /tmp/tmpyfsnbwbb Check the logs for full command output.
#21 38.97   ----------------------------------------
#21 38.97 ERROR: Command errored out with exit status 1: /usr/local/bin/python /usr/local/lib/python3.9/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-v5785w0c/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel 'Cython>=0.29.21,<3' 'numpy==1.15.4; python_version=='"'"'3.6'"'"' and platform_system!='"'"'AIX'"'"'' 'numpy==1.15.4; python_version=='"'"'3.7'"'"' and platform_system!='"'"'AIX'"'"'' 'numpy==1.17.3; python_version=='"'"'3.8'"'"' and platform_system!='"'"'AIX'"'"'' 'numpy==1.16.0; python_version=='"'"'3.6'"'"' and platform_system=='"'"'AIX'"'"'' 'numpy==1.16.0; python_version=='"'"'3.7'"'"' and platform_system=='"'"'AIX'"'"'' 'numpy==1.17.3; python_version=='"'"'3.8'"'"' and platform_system=='"'"'AIX'"'"'' 'numpy; python_version>='"'"'3.9'"'"'' Check the logs for full command output.
#21 ERROR: executor failed running [/bin/sh -c pip install -r requirements.txt --target=/home/app/python]: exit code: 1
------
 > [stage-1 15/18] RUN pip install -r requirements.txt --target=/home/app/python:
------
executor failed running [/bin/sh -c pip install -r requirements.txt --target=/home/app/python]: exit code: 1

Next steps

You may join Slack for community support.

LucasRoesler commented 3 years ago

You need to use the debian based image for pandas, for example python3-debian

The default python image uses alpine and does not have certain required c libraries for pandas to install correctly.

alexellis commented 3 years ago

/lock: resolved, and also covered in the docs

alexellis commented 3 years ago

Thanks @LucasRoesler