I am trying to run the command docker-compose up
and I am getting the following issue:
$ docker-compose up
Traceback (most recent call last):
File "/usr/bin/docker-compose", line 9, in <module>
load_entry_point('docker-compose==1.7.1', 'console_scripts', 'docker-compose')()
File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 547, 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 2720, in load_entry_point
return ep.load()
File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2380, in load
return self.resolve()
File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2386, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/usr/lib/python2.7/site-packages/compose/cli/main.py", line 14, in <module>
from . import errors
File "/usr/lib/python2.7/site-packages/compose/cli/errors.py", line 9, in <module>
from docker.errors import APIError
File "/usr/lib/python2.7/site-packages/docker/__init__.py", line 20, in <module>
from .client import Client, AutoVersionClient, from_env # flake8: noqa
File "/usr/lib/python2.7/site-packages/docker/client.py", line 19, in <module>
import requests
File "/usr/lib/python2.7/site-packages/requests/__init__.py", line 61, in <module>
from .packages.urllib3.exceptions import DependencyWarning
ImportError: cannot import name DependencyWarning
Why? What's wrong? I am using Fedora 24 4.6.3-300.fc24.x86_64 and Docker Docker version 1.11.2, build b9f10c9, any advice?
Could be this - https://bugzilla.redhat.com/show_bug.cgi?id=1334055.
Looks like conflicting requests
versions?
Save my hours (y), Thanks
Only reinstall requests was enough for me:
pip uninstall requests
pip install requests
Thank you!!
[root@ansiblecontrolnode dockerbuild]# pip uninstall requests
Uninstalling requests-2.18.4:
Would remove:
/usr/lib/python2.7/site-packages/requests-2.18.4.dist-info/*
/usr/lib/python2.7/site-packages/requests/*
Would not remove (might be manually added):
/usr/lib/python2.7/site-packages/requests/__init__.pyo
/usr/lib/python2.7/site-packages/requests/adapters.pyo
/usr/lib/python2.7/site-packages/requests/api.pyo
/usr/lib/python2.7/site-packages/requests/auth.pyo
/usr/lib/python2.7/site-packages/requests/certs.pyo
/usr/lib/python2.7/site-packages/requests/compat.pyo
/usr/lib/python2.7/site-packages/requests/cookies.pyo
/usr/lib/python2.7/site-packages/requests/exceptions.pyo
/usr/lib/python2.7/site-packages/requests/hooks.pyo
/usr/lib/python2.7/site-packages/requests/models.pyo
/usr/lib/python2.7/site-packages/requests/packages/__init__.py
/usr/lib/python2.7/site-packages/requests/packages/__init__.pyo
/usr/lib/python2.7/site-packages/requests/sessions.pyo
/usr/lib/python2.7/site-packages/requests/status_codes.pyo
/usr/lib/python2.7/site-packages/requests/structures.pyo
/usr/lib/python2.7/site-packages/requests/utils.pyo
Proceed (y/n)? y
Successfully uninstalled requests-2.18.4
[root@ansiblecontrolnode dockerbuild]# pip install requests
Requirement already satisfied: requests in /usr/lib/python2.7/site-packages (2.6.0)
docker-compose 1.21.2 has requirement requests!=2.11.0,!=2.12.2,!=2.18.0,<2.19,>=2.6.1, but you'll have requests 2.6.0 which is incompatible.
docker 3.3.0 has requirement requests!=2.18.0,>=2.14.2, but you'll have requests 2.6.0 which is incompatible.
Most helpful comment
Only reinstall requests was enough for me: