Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Service 'beat' failed to build : The command '/bin/sh -c pip install --no-cache-dir -r requirements.txt' returned a non-zero code: 1 #706

Open
shahidkarimi opened this issue Feb 13, 2021 · 3 comments

Comments

@shahidkarimi
Copy link

While installing via docker-compose
Ubuntu 20.04

@cwilby
Copy link

cwilby commented Mar 4, 2021

Having a similar issue building with docker

Step 10/16 : RUN pip install --no-cache-dir -r requirements.txt
 ---> Running in cb3bf9635c9b
Traceback (most recent call last):
  File "/usr/bin/pip", line 9, in <module>
    load_entry_point('pip==21.0.1', 'console_scripts', 'pip')()
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 542, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2569, in load_entry_point
    return ep.load()
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2229, in load
    return self.resolve()
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2235, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/usr/lib/python2.7/site-packages/pip/_internal/cli/main.py", line 60
    sys.stderr.write(f"ERROR: {exc}")
                                   ^
SyntaxError: invalid syntax

@ghost
Copy link

ghost commented Mar 12, 2021

I think this is due to pip dropping support for python2, see here.

"DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality."

I was able to build the image for now by replacing the line that upgrades pip to the latest version on the dockerfile, and installing the previous version on the list instead (20.3.4).

RUN pip install pip==20.3.4

@cwilby
Copy link

cwilby commented Mar 14, 2021

I avoided this problem by using the correct repository for docker-compose setup: https://github.com/cabotapp/docker-cabot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants