-
Notifications
You must be signed in to change notification settings - Fork 201
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
Upgrade pip in all Docker images. #746
Upgrade pip in all Docker images. #746
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
After using RUN python -m pip install -U setuptools Downloading/unpacking setuptools from https://files.pythonhosted.org/packages/7c/1b/9b68465658cda69f33c31c4dbd511ac5648835680ea8de87ce05c81f95bf/setuptools-50.3.0.zip#sha256=39060a59d91cf5cf403fa3bacbb52df4205a8c3585e0b9ba4b30e0e19d4c4b18 File "", line 3, in File "setuptools/init.py", line 16, in
File "setuptools/version.py", line 1, in
File "pkg_resources/init.py", line 1365
SyntaxError: invalid syntax |
@sravano9 What platform are you on? Can you share the docker command you're running? These will help me try to reproduce this error. |
@bcipriano I am executing this below command inside docker file I am using python version 2.7 and Ubuntu Os please let me know any changes required |
Sorry to be clear I mean, can you share the command you're using to actually kick off the docker build. I.e. What version of Ubuntu are you on? |
Hi, I'm using Bazel Container Image Rules do build and run a python image, I'm also encountering the same issue, I have tried to upgrade setuptools to lates version, but still getting the same error:
Please feel free to let me know if you need any more information, thanks |
@HuanwenChen312 What's the exact version of Python you're using? I.e. the result if you run |
Link the Issue(s) this Pull Request is related to.
Fixes #745
Summarize your change.
The base CentOS image uses an old version of
pip
, which can cause errors when trying to upgradesetuptools
. Upgrade pip in all Docker images to fix this.This exposes an issue with the dual-Python setup we're using. We rely on calling
pip
directly from the shell, which is not a stable symlink. Upgrading pip from either Python 2 or 3 creates a new symlink and it becomes non-obvious which version you're then operating in. To fix this we switch all images to usepython -m pip
instead ofpip
, which always gives us a version-appropriate pip version.