suraj95 / Spark-on-Docker

A tutorial on how to run Apache Spark on Docker
MIT License
29 stars 18 forks source link

Docker Build is failing #4

Open aamin25 opened 3 years ago

aamin25 commented 3 years ago

It was initially failing executing the pip3 commands, I commented the pip and setuptools upgrade.

`Aamins-MacBook-Air:spark_test aaminkhan$ ./build_cluster.sh Building master [+] Building 4.1s (10/14)
=> [internal] load build definition from Dockerfile 0.0s => => transferring dockerfile: 119B 0.0s => [internal] load .dockerignore 0.0s => => transferring context: 35B 0.0s => [internal] load metadata for docker.io/library/debian:stretch 2.9s => [auth] library/debian:pull token for registry-1.docker.io 0.0s => [1/9] FROM docker.io/library/debian:stretch@sha256:4b9b2ef8de1f3e9531626e8eb3d19e104e9 0.0s => [internal] load build context 0.0s => => transferring context: 216B 0.0s => CACHED [2/9] RUN apt-get update && apt-get install -y locales && dpkg-reconfigure -f 0.0s => CACHED [3/9] RUN apt-get update && apt-get install -y curl unzip python3 python3- 0.0s => CACHED [4/9] ADD requirements-pip.txt . 0.0s => ERROR [5/9] RUN pip3 install -r requirements-pip.txt 0.9s

[5/9] RUN pip3 install -r requirements-pip.txt:

10 0.714 Traceback (most recent call last):

10 0.714 File "/usr/local/bin/pip3", line 11, in

10 0.714 load_entry_point('pip==21.0.1', 'console_scripts', 'pip3')()

10 0.714 File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 561, in load_entry_point

10 0.714 return get_distribution(dist).load_entry_point(group, name)

10 0.714 File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 2631, in load_entry_point

10 0.714 return ep.load()

10 0.714 File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 2291, in load

10 0.714 return self.resolve()

10 0.714 File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 2297, in resolve

10 0.714 module = import(self.module_name, fromlist=['name'], level=0)

10 0.714 File "/usr/local/lib/python3.5/dist-packages/pip-21.0.1-py3.5.egg/pip/_internal/cli/main.py", line 60

10 0.714 sys.stderr.write(f"ERROR: {exc}")

10 0.714 ^

10 0.714 SyntaxError: invalid syntax


executor failed running [/bin/sh -c pip3 install -r requirements-pip.txt]: exit code: 1 ERROR: Service 'master' failed to build`

suraj95 commented 1 year ago

You seem to be using Python 3.5 and pip has dropped support for it. Try a newer version of python.

https://stackoverflow.com/questions/66212924/pip-sys-stderr-writeferror-exc-with-python-3-5