Skip to content

Prevent two versions of pip #100

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

Closed

Conversation

kane-c
Copy link
Contributor

@kane-c kane-c commented Apr 9, 2016

During the build, pip is upgraded, but the old version is not replaced.

This results in the pip update message being shown whenever you use it:

You are using pip version 7.1.2, however version 8.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

Even though the latest version is used:

$ pip -V
pip 8.1.1 from /usr/local/lib/python3.5/site-packages (python 3.5)

I noticed the --ignore-installed flag was backported from the 3.5 Dockerfile but couldn't find any explanation for it. Removing it worked well for me though.

@yosifkit
Copy link
Member

I am unable to replicate the message. Is there a specific python image and command to replicate?

@kane-c
Copy link
Contributor Author

kane-c commented Apr 12, 2016

I was able to get the message to show when using pip freeze --all however I am unable to reproduce it right now (using python:3-slim, a86038c37529) but I am on a different machine.

I'll try again on my main machine and let you know if it's still happening.

@kane-c
Copy link
Contributor Author

kane-c commented Apr 12, 2016

Just tried again:

$ docker pull python
...
$ docker run -it python bash
root@bb37bd1e796b:/# pip -V
pip 8.1.1 from /usr/local/lib/python3.5/site-packages (python 3.5)
root@bb37bd1e796b:/# pip freeze
You are using pip version 7.1.2, however version 8.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

$ docker info
Containers: 5
 Running: 1
 Paused: 0
 Stopped: 4
Images: 39
Server Version: 1.10.3
Storage Driver: aufs
 Root Dir: /var/lib/docker/aufs
 Backing Filesystem: extfs
 Dirs: 89
 Dirperm1 Supported: true
Execution Driver: native-0.2
Logging Driver: json-file
Plugins: 
 Volume: local
 Network: bridge null host
Kernel Version: 4.2.0-35-generic
Operating System: Ubuntu 15.10
OSType: linux
Architecture: x86_64
CPUs: 1
Total Memory: 988.8 MiB
Name: ubuntu
ID: QWGT:FBLL:RKQP:QSGM:NTA5:YPVY:B4W4:E5Y7:6ECE:AUOQ:LBU4:P43B
Username: kanec
Registry: https://index.docker.io/v1/
WARNING: No swap limit support

$ docker version
Client:
 Version:      1.10.3
 API version:  1.22
 Go version:   go1.5.3
 Git commit:   20f81dd
 Built:        Thu Mar 10 15:59:07 2016
 OS/Arch:      linux/amd64

Server:
 Version:      1.10.3
 API version:  1.22
 Go version:   go1.5.3
 Git commit:   20f81dd
 Built:        Thu Mar 10 15:59:07 2016
 OS/Arch:      linux/amd64

mal added a commit to mal/python that referenced this pull request Apr 10, 2017
Following discussion in docker-library#187 it was decided that
rather than refactor this check, it should be removed. This was because
the original error condition it was designed to prevent could not be
reproduced. This is done with the understanding that it may need to be
revisited if any recurrance (of docker-library#100) is
encountered in future.
tao12345666333 pushed a commit to tao12345666333/python that referenced this pull request Jun 28, 2018
Following discussion in docker-library#187 it was decided that
rather than refactor this check, it should be removed. This was because
the original error condition it was designed to prevent could not be
reproduced. This is done with the understanding that it may need to be
revisited if any recurrance (of docker-library#100) is
encountered in future.
VenusPR pushed a commit to VenusPR/Python_Richard that referenced this pull request Mar 9, 2023
Following discussion in docker-library/python#187 it was decided that
rather than refactor this check, it should be removed. This was because
the original error condition it was designed to prevent could not be
reproduced. This is done with the understanding that it may need to be
revisited if any recurrance (of docker-library/python#100) is
encountered in future.
ProActiveSpirit pushed a commit to ProActiveSpirit/python that referenced this pull request Mar 1, 2024
Following discussion in docker-library/python#187 it was decided that
rather than refactor this check, it should be removed. This was because
the original error condition it was designed to prevent could not be
reproduced. This is done with the understanding that it may need to be
revisited if any recurrance (of docker-library/python#100) is
encountered in future.
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

Successfully merging this pull request may close these issues.

2 participants