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

pip package docker's dependency on requests #48780

Closed
rongshengfang opened this issue Jul 26, 2018 · 5 comments
Closed

pip package docker's dependency on requests #48780

rongshengfang opened this issue Jul 26, 2018 · 5 comments
Labels
Pending-Discussion The issue or pull request needs more discussion before it can be closed or merged stale
Milestone

Comments

@rongshengfang
Copy link

Description of Issue/Question

I am trying to install the pip package docker as the prerequisite of the docker_* states (on CentOS 7.5), but running into an issue with the install:

# pip install docker
Collecting docker
  Using cached https://files.pythonhosted.org/packages/a5/64/8c0a5d22e70257e6b7ef7f14b577f99f0b9b1560c604f87856d0db80d151/docker-3.4.1-py2.py3-none-any.whl
Requirement already satisfied: websocket-client>=0.32.0 in /usr/lib/python2.7/site-packages (from docker) (0.48.0)
Requirement already satisfied: docker-pycreds>=0.3.0 in /usr/lib/python2.7/site-packages (from docker) (0.3.0)
Requirement already satisfied: backports.ssl-match-hostname>=3.5; python_version < "3.5" in /usr/lib/python2.7/site-packages (from docker) (3.5.0.1)
Requirement already satisfied: ipaddress>=1.0.16; python_version < "3.3" in /usr/lib/python2.7/site-packages (from docker) (1.0.16)
Requirement already satisfied: six>=1.4.0 in /usr/lib/python2.7/site-packages (from docker) (1.9.0)
Collecting requests!=2.18.0,>=2.14.2 (from docker)
  Using cached https://files.pythonhosted.org/packages/65/47/7e02164a2a3db50ed6d8a6ab1d6d60b69c4c3fdf57a284257925dfc12bda/requests-2.19.1-py2.py3-none-any.whl
Requirement already satisfied: idna<2.8,>=2.5 in /usr/lib/python2.7/site-packages (from requests!=2.18.0,>=2.14.2->docker) (2.7)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/lib/python2.7/site-packages (from requests!=2.18.0,>=2.14.2->docker) (3.0.4)
Requirement already satisfied: urllib3<1.24,>=1.21.1 in /usr/lib/python2.7/site-packages (from requests!=2.18.0,>=2.14.2->docker) (1.23)
Requirement already satisfied: certifi>=2017.4.17 in /usr/lib/python2.7/site-packages (from requests!=2.18.0,>=2.14.2->docker) (2018.4.16)
Installing collected packages: requests, docker
  Found existing installation: requests 2.6.0
Cannot uninstall 'requests'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
You are using pip version 10.0.1, however version 18.0 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

requests 2.6.0 was installed via yum as part of the requirement for salt-minion and it's from SaltStack's yum repo.

How do I get the pip package docker properly installed?

Setup

(Please provide relevant configs and/or SLS files (Be sure to remove sensitive info).)

Steps to Reproduce Issue

(Include debug logs if possible and relevant.)

pip install docker on CentOS 7.5 with SaltStack 2018.3.2.

Versions Report

(Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)

# salt-call --versions-report
Salt Version:
           Salt: 2018.3.2

Dependency Versions:
           cffi: Not Installed
       cherrypy: Not Installed
       dateutil: 2.7.3
      docker-py: 1.10.6
          gitdb: Not Installed
      gitpython: Not Installed
          ioflo: Not Installed
         Jinja2: 2.7.2
        libgit2: Not Installed
        libnacl: Not Installed
       M2Crypto: Not Installed
           Mako: Not Installed
   msgpack-pure: Not Installed
 msgpack-python: 0.5.1
   mysql-python: Not Installed
      pycparser: Not Installed
       pycrypto: 2.6.1
   pycryptodome: Not Installed
         pygit2: Not Installed
         Python: 2.7.5 (default, Apr 11 2018, 07:36:10)
   python-gnupg: Not Installed
         PyYAML: 3.10
          PyZMQ: Not Installed
           RAET: Not Installed
          smmap: Not Installed
        timelib: Not Installed
        Tornado: 4.2.1
            ZMQ: Not Installed

System Versions:
           dist: centos 7.5.1804 Core
         locale: UTF-8
        machine: x86_64
        release: 3.10.0-862.6.3.el7.x86_64
         system: Linux
        version: CentOS Linux 7.5.1804 Core
@Ch3LL
Copy link
Contributor

Ch3LL commented Jul 26, 2018

this seems to be on purpose with pip not wanting ot try to uninstall distutils packages.

You can see issues:

pypa/pip#4805
pypa/pip#5247

for explanations. In pip 10 they make sure they don't try to uninstall distutils packages. One workaround in that issue is to downgrade to pip 9.

in relation to the requests package being managed by our repo ping @dmurphy18 is there a specific reason we are using distutils?

@Ch3LL Ch3LL added the Pending-Discussion The issue or pull request needs more discussion before it can be closed or merged label Jul 26, 2018
@Ch3LL Ch3LL added this to the Blocked milestone Jul 26, 2018
@rongshengfang
Copy link
Author

rongshengfang commented Jul 27, 2018 via email

@gtmanfred
Copy link
Contributor

You will need to uninstall the system package using your package manager, and then pip install requests instead.

Or you can use your package manager to install python-docker or python-docker-py, depending on the distribution.

@dmurphy18
Copy link
Contributor

@rongshengfang FYI the current point releases for Salt 2018.3.4 and 2019.2.0 no longer provide a python-requests package from SaltStack but rely on the underlying package from the OS.

@stale
Copy link

stale bot commented Jan 8, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.

@stale stale bot added the stale label Jan 8, 2020
@stale stale bot closed this as completed Jan 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Pending-Discussion The issue or pull request needs more discussion before it can be closed or merged stale
Projects
None yet
Development

No branches or pull requests

4 participants