Compose: docker-compose

Created on 28 May 2017  ยท  8Comments  ยท  Source: docker/compose

I just tried to install docker-compose on a fresh Ubuntu 16.04 64bit / Linux 4.8.0-36-generic system. I get this
```nathan@davisfamilyserver:~$ docker-compose --version
Traceback (most recent call last):
File "/usr/bin/docker-compose", line 9, in
load_entry_point('docker-compose==1.8.0', 'console_scripts', 'docker-compose')()
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 561, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2631, in load_entry_point
return ep.load()
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2291, in load
return self.resolve()
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2297, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/usr/lib/python2.7/dist-packages/compose/cli/main.py", line 17, in
from ..bundle import get_image_digests
File "/usr/lib/python2.7/dist-packages/compose/bundle.py", line 14, in
from .service import format_environment
File "/usr/lib/python2.7/dist-packages/compose/service.py", line 13, in
from docker.utils import LogConfig
ImportError: cannot import name LogConfig


It seems this is similar to [this issue](https://github.com/docker/compose/issues/1567) so here is the output of pip list

pip list
DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.
acme (0.14.2)
backports.ssl-match-hostname (3.5.0.1)
bernhard (0.2.5)
bottle (0.12.13)
cached-property (1.3.0)
cassandra-driver (3.10)
certbot (0.14.2)
certifi (2017.4.17)
chardet (3.0.3)
colorama (0.3.9)
ConfigArgParse (0.11.0)
configobj (5.0.6)
CouchDB (1.1)
cryptography (1.7.1)
cycler (0.10.0)
dnspython (1.15.0)
docker (2.3.0)
docker-compose (1.8.0)
docker-py (1.9.0)
docker-pycreds (0.2.1)
dockerpty (0.4.1)
docopt (0.6.2)
elasticsearch (5.4.0)
enum-compat (0.0.2)
enum34 (1.1.6)
funcsigs (0.4)
functools32 (3.2.3.post2)
futures (3.1.1)
Glances (2.10)
idna (2.5)
influxdb (4.1.0)
ipaddr (2.1.11)
ipaddress (1.0.18)
jsonschema (2.6.0)
kafka-python (1.3.3)
libvirt-python (1.3.1)
matplotlib (2.0.2)
mock (1.3.0)
ndg-httpsclient (0.4.2)
netifaces (0.10.5)
numpy (1.12.1)
nvidia-ml-py (375.53.1)
parsedatetime (2.1)
pbkdf2 (1.3)
pbr (1.8.0)
pika (0.10.0)
pip (9.0.1)
ply (3.10)
potsdb (1.0.3)
prometheus-client (0.0.19)
protobuf (3.3.0)
psutil (5.2.2)
py-cpuinfo (3.2.0)
pyasn1 (0.2.3)
pycryptodome (3.4.6)
pygobject (3.20.0)
PyICU (1.9.2)
pymdstat (0.4.2)
pyOpenSSL (17.0.0)
pyparsing (2.2.0)
pyRFC3339 (1.0)
pysmi (0.1.3)
pysnmp (4.3.5)
pystache (0.5.4)
python-dateutil (2.6.0)
python2-pythondialog (3.3.0)
pytz (2014.10)
PyYAML (3.12)
pyzmq (16.0.2)
requests (2.11.1)
scandir (1.5)
setuptools (33.1.1)
six (1.10.0)
statsd (3.2.1)
subprocess32 (3.2.7)
texttable (0.8.8)
urllib3 (1.21.1)
websocket-client (0.40.0)
wheel (0.29.0)
wifi (0.3.8)
zeroconf (0.19.0)
zope.component (4.2.2)
zope.event (4.2.0)
zope.hookable (4.0.4)
zope.interface (4.1.3)

Running docker-py upgrade doesnt' seem to work

nathan@davisfamilyserver:~$ docker-py upgrade
docker-py: command not found
```
Other system information
Docker 17.05.0-ce)
pip 9.0.1 from /home/nathan/.local/lib/python2.7/site-packages (python 2.7)

kinquestion

Most helpful comment

pip uninstall docker-py; pip install -U docker-compose

All 8 comments

pip uninstall docker-py; pip install -U docker-compose

If it's a fresh install, I'm not sure how you ended up with docker-compose 1.8.0 which is almost 1 year old. But regardless, the above command should sort things out. In the future, make sure to use virtualenv to keep conflicting dependencies (in this case docker and docker-py) from interfering with each other.

Related: #4344

I assume it was something idiotic I did when I couldn't get compose to install. Sadly I am still having problems. Thank you for your help!

nathan@davisfamilyserver:~$ pip uninstall docker-py; pip install -U docker-compose
Uninstalling docker-py-1.9.0:
  /usr/lib/python2.7/dist-packages/docker
  /usr/lib/python2.7/dist-packages/docker_py-1.9.0.egg-info
Proceed (y/n)? y
Exception:
Traceback (most recent call last):
  File "/home/nathan/.local/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/home/nathan/.local/lib/python2.7/site-packages/pip/commands/uninstall.py", line 76, in run
    requirement_set.uninstall(auto_confirm=options.yes)
  File "/home/nathan/.local/lib/python2.7/site-packages/pip/req/req_set.py", line 346, in uninstall
    req.uninstall(auto_confirm=auto_confirm)
  File "/home/nathan/.local/lib/python2.7/site-packages/pip/req/req_install.py", line 754, in uninstall
    paths_to_remove.remove(auto_confirm)
  File "/home/nathan/.local/lib/python2.7/site-packages/pip/req/req_uninstall.py", line 115, in remove
    renames(path, new_path)
  File "/home/nathan/.local/lib/python2.7/site-packages/pip/utils/__init__.py", line 267, in renames
    shutil.move(old, new)
  File "/usr/lib/python2.7/shutil.py", line 300, in move
    rmtree(src)
  File "/usr/lib/python2.7/shutil.py", line 252, in rmtree
    onerror(os.remove, fullname, sys.exc_info())
  File "/usr/lib/python2.7/shutil.py", line 250, in rmtree
    os.remove(fullname)
OSError: [Errno 13] Permission denied: '/usr/lib/python2.7/dist-packages/docker/constants.py'
Collecting docker-compose
  Downloading docker_compose-1.13.0-py2.py3-none-any.whl (94kB)
    100% |โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ| 102kB 634kB/s 
Requirement already up-to-date: six<2,>=1.3.0 in /usr/lib/python2.7/dist-packages (from docker-compose)
Requirement already up-to-date: dockerpty<0.5,>=0.4.1 in /usr/lib/python2.7/dist-packages (from docker-compose)
Requirement already up-to-date: texttable<0.9,>=0.8.1 in /usr/local/lib/python2.7/dist-packages (from docker-compose)
Requirement already up-to-date: cached-property<2,>=1.2.0 in /usr/lib/python2.7/dist-packages (from docker-compose)
Requirement already up-to-date: jsonschema<3,>=2.5.1 in /usr/local/lib/python2.7/dist-packages (from docker-compose)
Requirement already up-to-date: ipaddress>=1.0.16; python_version < "3.3" in /usr/local/lib/python2.7/dist-packages (from docker-compose)
Requirement already up-to-date: backports.ssl-match-hostname>=3.5; python_version < "3.5" in /usr/local/lib/python2.7/dist-packages (from docker-compose)
Requirement already up-to-date: docker<3.0,>=2.2.1 in /usr/local/lib/python2.7/dist-packages (from docker-compose)
Requirement already up-to-date: enum34<2,>=1.0.4; python_version < "3.4" in /usr/local/lib/python2.7/dist-packages (from docker-compose)
Requirement already up-to-date: docopt<0.7,>=0.6.1 in /usr/lib/python2.7/dist-packages (from docker-compose)
Requirement already up-to-date: colorama<0.4,>=0.3.7 in /usr/local/lib/python2.7/dist-packages (from docker-compose)
Requirement already up-to-date: PyYAML<4,>=3.10 in /usr/local/lib/python2.7/dist-packages (from docker-compose)
Requirement already up-to-date: requests!=2.11.0,<2.12,>=2.6.1 in /usr/local/lib/python2.7/dist-packages (from docker-compose)
Requirement already up-to-date: websocket-client<1.0,>=0.32.0 in /usr/local/lib/python2.7/dist-packages (from docker-compose)
Requirement already up-to-date: functools32; python_version == "2.7" in /usr/local/lib/python2.7/dist-packages (from jsonschema<3,>=2.5.1->docker-compose)
Requirement already up-to-date: docker-pycreds>=0.2.1 in /usr/local/lib/python2.7/dist-packages (from docker<3.0,>=2.2.1->docker-compose)
Installing collected packages: docker-compose
  Found existing installation: docker-compose 1.8.0
    Uninstalling docker-compose-1.8.0:
Exception:
Traceback (most recent call last):
  File "/home/nathan/.local/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/home/nathan/.local/lib/python2.7/site-packages/pip/commands/install.py", line 342, in run
    prefix=options.prefix_path,
  File "/home/nathan/.local/lib/python2.7/site-packages/pip/req/req_set.py", line 778, in install
    requirement.uninstall(auto_confirm=True)
  File "/home/nathan/.local/lib/python2.7/site-packages/pip/req/req_install.py", line 754, in uninstall
    paths_to_remove.remove(auto_confirm)
  File "/home/nathan/.local/lib/python2.7/site-packages/pip/req/req_uninstall.py", line 115, in remove
    renames(path, new_path)
  File "/home/nathan/.local/lib/python2.7/site-packages/pip/utils/__init__.py", line 267, in renames
    shutil.move(old, new)
  File "/usr/lib/python2.7/shutil.py", line 303, in move
    os.unlink(src)
OSError: [Errno 13] Permission denied: '/usr/bin/docker-compose'
nathan@davisfamilyserver:~$ sudo !!
sudo pip uninstall docker-py; pip install -U docker-compose
The directory '/home/nathan/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Uninstalling docker-py-1.9.0:
  /usr/lib/python2.7/dist-packages/docker
  /usr/lib/python2.7/dist-packages/docker_py-1.9.0.egg-info
Proceed (y/n)? y
  Successfully uninstalled docker-py-1.9.0
The directory '/home/nathan/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting docker-compose
  Using cached docker_compose-1.13.0-py2.py3-none-any.whl
Requirement already up-to-date: six<2,>=1.3.0 in /usr/lib/python2.7/dist-packages (from docker-compose)
Requirement already up-to-date: dockerpty<0.5,>=0.4.1 in /usr/lib/python2.7/dist-packages (from docker-compose)
Requirement already up-to-date: texttable<0.9,>=0.8.1 in /usr/local/lib/python2.7/dist-packages (from docker-compose)
Requirement already up-to-date: cached-property<2,>=1.2.0 in /usr/lib/python2.7/dist-packages (from docker-compose)
Requirement already up-to-date: jsonschema<3,>=2.5.1 in /usr/local/lib/python2.7/dist-packages (from docker-compose)
Requirement already up-to-date: ipaddress>=1.0.16; python_version < "3.3" in /usr/local/lib/python2.7/dist-packages (from docker-compose)
Requirement already up-to-date: backports.ssl-match-hostname>=3.5; python_version < "3.5" in /usr/local/lib/python2.7/dist-packages (from docker-compose)
Requirement already up-to-date: docker<3.0,>=2.2.1 in /usr/local/lib/python2.7/dist-packages (from docker-compose)
Requirement already up-to-date: enum34<2,>=1.0.4; python_version < "3.4" in /usr/local/lib/python2.7/dist-packages (from docker-compose)
Requirement already up-to-date: docopt<0.7,>=0.6.1 in /usr/lib/python2.7/dist-packages (from docker-compose)
Requirement already up-to-date: colorama<0.4,>=0.3.7 in /usr/local/lib/python2.7/dist-packages (from docker-compose)
Requirement already up-to-date: PyYAML<4,>=3.10 in /usr/local/lib/python2.7/dist-packages (from docker-compose)
Requirement already up-to-date: requests!=2.11.0,<2.12,>=2.6.1 in /usr/local/lib/python2.7/dist-packages (from docker-compose)
Requirement already up-to-date: websocket-client<1.0,>=0.32.0 in /usr/local/lib/python2.7/dist-packages (from docker-compose)
Requirement already up-to-date: functools32; python_version == "2.7" in /usr/local/lib/python2.7/dist-packages (from jsonschema<3,>=2.5.1->docker-compose)
Requirement already up-to-date: docker-pycreds>=0.2.1 in /usr/local/lib/python2.7/dist-packages (from docker<3.0,>=2.2.1->docker-compose)
Installing collected packages: docker-compose
  Found existing installation: docker-compose 1.8.0
    Uninstalling docker-compose-1.8.0:
Exception:
Traceback (most recent call last):
  File "/home/nathan/.local/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/home/nathan/.local/lib/python2.7/site-packages/pip/commands/install.py", line 342, in run
    prefix=options.prefix_path,
  File "/home/nathan/.local/lib/python2.7/site-packages/pip/req/req_set.py", line 778, in install
    requirement.uninstall(auto_confirm=True)
  File "/home/nathan/.local/lib/python2.7/site-packages/pip/req/req_install.py", line 754, in uninstall
    paths_to_remove.remove(auto_confirm)
  File "/home/nathan/.local/lib/python2.7/site-packages/pip/req/req_uninstall.py", line 115, in remove
    renames(path, new_path)
  File "/home/nathan/.local/lib/python2.7/site-packages/pip/utils/__init__.py", line 267, in renames
    shutil.move(old, new)
  File "/usr/lib/python2.7/shutil.py", line 303, in move
    os.unlink(src)
OSError: [Errno 13] Permission denied: '/usr/bin/docker-compose'

You probably need sudo

On Thu, Jun 1, 2017, 3:01 PM Nathan notifications@github.com wrote:

I assume it was something idiotic I did when I couldn't get compose to
install. Sadly I am still having problems

nathan@davisfamilyserver:~$ pip uninstall docker-py; pip install -U docker-compose
Uninstalling docker-py-1.9.0:
/usr/lib/python2.7/dist-packages/docker
/usr/lib/python2.7/dist-packages/docker_py-1.9.0.egg-info
Proceed (y/n)? y
Exception:
Traceback (most recent call last):
File "/home/nathan/.local/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/home/nathan/.local/lib/python2.7/site-packages/pip/commands/uninstall.py", line 76, in run
requirement_set.uninstall(auto_confirm=options.yes)
File "/home/nathan/.local/lib/python2.7/site-packages/pip/req/req_set.py", line 346, in uninstall
req.uninstall(auto_confirm=auto_confirm)
File "/home/nathan/.local/lib/python2.7/site-packages/pip/req/req_install.py", line 754, in uninstall
paths_to_remove.remove(auto_confirm)
File "/home/nathan/.local/lib/python2.7/site-packages/pip/req/req_uninstall.py", line 115, in remove
renames(path, new_path)
File "/home/nathan/.local/lib/python2.7/site-packages/pip/utils/__init__.py", line 267, in renames
shutil.move(old, new)
File "/usr/lib/python2.7/shutil.py", line 300, in move
rmtree(src)
File "/usr/lib/python2.7/shutil.py", line 252, in rmtree
onerror(os.remove, fullname, sys.exc_info())
File "/usr/lib/python2.7/shutil.py", line 250, in rmtree
os.remove(fullname)
OSError: [Errno 13] Permission denied: '/usr/lib/python2.7/dist-packages/docker/constants.py'
Collecting docker-compose
Downloading docker_compose-1.13.0-py2.py3-none-any.whl (94kB)
100% |โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ| 102kB 634kB/s
Requirement already up-to-date: six<2,>=1.3.0 in /usr/lib/python2.7/dist-packages (from docker-compose)
Requirement already up-to-date: dockerpty<0.5,>=0.4.1 in /usr/lib/python2.7/dist-packages (from docker-compose)
Requirement already up-to-date: texttable<0.9,>=0.8.1 in /usr/local/lib/python2.7/dist-packages (from docker-compose)
Requirement already up-to-date: cached-property<2,>=1.2.0 in /usr/lib/python2.7/dist-packages (from docker-compose)
Requirement already up-to-date: jsonschema<3,>=2.5.1 in /usr/local/lib/python2.7/dist-packages (from docker-compose)
Requirement already up-to-date: ipaddress>=1.0.16; python_version < "3.3" in /usr/local/lib/python2.7/dist-packages (from docker-compose)
Requirement already up-to-date: backports.ssl-match-hostname>=3.5; python_version < "3.5" in /usr/local/lib/python2.7/dist-packages (from docker-compose)
Requirement already up-to-date: docker<3.0,>=2.2.1 in /usr/local/lib/python2.7/dist-packages (from docker-compose)
Requirement already up-to-date: enum34<2,>=1.0.4; python_version < "3.4" in /usr/local/lib/python2.7/dist-packages (from docker-compose)
Requirement already up-to-date: docopt<0.7,>=0.6.1 in /usr/lib/python2.7/dist-packages (from docker-compose)
Requirement already up-to-date: colorama<0.4,>=0.3.7 in /usr/local/lib/python2.7/dist-packages (from docker-compose)
Requirement already up-to-date: PyYAML<4,>=3.10 in /usr/local/lib/python2.7/dist-packages (from docker-compose)
Requirement already up-to-date: requests!=2.11.0,<2.12,>=2.6.1 in /usr/local/lib/python2.7/dist-packages (from docker-compose)
Requirement already up-to-date: websocket-client<1.0,>=0.32.0 in /usr/local/lib/python2.7/dist-packages (from docker-compose)
Requirement already up-to-date: functools32; python_version == "2.7" in /usr/local/lib/python2.7/dist-packages (from jsonschema<3,>=2.5.1->docker-compose)
Requirement already up-to-date: docker-pycreds>=0.2.1 in /usr/local/lib/python2.7/dist-packages (from docker<3.0,>=2.2.1->docker-compose)
Installing collected packages: docker-compose
Found existing installation: docker-compose 1.8.0
Uninstalling docker-compose-1.8.0:
Exception:
Traceback (most recent call last):
File "/home/nathan/.local/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/home/nathan/.local/lib/python2.7/site-packages/pip/commands/install.py", line 342, in run
prefix=options.prefix_path,
File "/home/nathan/.local/lib/python2.7/site-packages/pip/req/req_set.py", line 778, in install
requirement.uninstall(auto_confirm=True)
File "/home/nathan/.local/lib/python2.7/site-packages/pip/req/req_install.py", line 754, in uninstall
paths_to_remove.remove(auto_confirm)
File "/home/nathan/.local/lib/python2.7/site-packages/pip/req/req_uninstall.py", line 115, in remove
renames(path, new_path)
File "/home/nathan/.local/lib/python2.7/site-packages/pip/utils/__init__.py", line 267, in renames
shutil.move(old, new)
File "/usr/lib/python2.7/shutil.py", line 303, in move
os.unlink(src)
OSError: [Errno 13] Permission denied: '/usr/bin/docker-compose'
nathan@davisfamilyserver:~$ sudo !!
sudo pip uninstall docker-py; pip install -U docker-compose
The directory '/home/nathan/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Uninstalling docker-py-1.9.0:
/usr/lib/python2.7/dist-packages/docker
/usr/lib/python2.7/dist-packages/docker_py-1.9.0.egg-info
Proceed (y/n)? y
Successfully uninstalled docker-py-1.9.0
The directory '/home/nathan/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting docker-compose
Using cached docker_compose-1.13.0-py2.py3-none-any.whl
Requirement already up-to-date: six<2,>=1.3.0 in /usr/lib/python2.7/dist-packages (from docker-compose)
Requirement already up-to-date: dockerpty<0.5,>=0.4.1 in /usr/lib/python2.7/dist-packages (from docker-compose)
Requirement already up-to-date: texttable<0.9,>=0.8.1 in /usr/local/lib/python2.7/dist-packages (from docker-compose)
Requirement already up-to-date: cached-property<2,>=1.2.0 in /usr/lib/python2.7/dist-packages (from docker-compose)
Requirement already up-to-date: jsonschema<3,>=2.5.1 in /usr/local/lib/python2.7/dist-packages (from docker-compose)
Requirement already up-to-date: ipaddress>=1.0.16; python_version < "3.3" in /usr/local/lib/python2.7/dist-packages (from docker-compose)
Requirement already up-to-date: backports.ssl-match-hostname>=3.5; python_version < "3.5" in /usr/local/lib/python2.7/dist-packages (from docker-compose)
Requirement already up-to-date: docker<3.0,>=2.2.1 in /usr/local/lib/python2.7/dist-packages (from docker-compose)
Requirement already up-to-date: enum34<2,>=1.0.4; python_version < "3.4" in /usr/local/lib/python2.7/dist-packages (from docker-compose)
Requirement already up-to-date: docopt<0.7,>=0.6.1 in /usr/lib/python2.7/dist-packages (from docker-compose)
Requirement already up-to-date: colorama<0.4,>=0.3.7 in /usr/local/lib/python2.7/dist-packages (from docker-compose)
Requirement already up-to-date: PyYAML<4,>=3.10 in /usr/local/lib/python2.7/dist-packages (from docker-compose)
Requirement already up-to-date: requests!=2.11.0,<2.12,>=2.6.1 in /usr/local/lib/python2.7/dist-packages (from docker-compose)
Requirement already up-to-date: websocket-client<1.0,>=0.32.0 in /usr/local/lib/python2.7/dist-packages (from docker-compose)
Requirement already up-to-date: functools32; python_version == "2.7" in /usr/local/lib/python2.7/dist-packages (from jsonschema<3,>=2.5.1->docker-compose)
Requirement already up-to-date: docker-pycreds>=0.2.1 in /usr/local/lib/python2.7/dist-packages (from docker<3.0,>=2.2.1->docker-compose)
Installing collected packages: docker-compose
Found existing installation: docker-compose 1.8.0
Uninstalling docker-compose-1.8.0:
Exception:
Traceback (most recent call last):
File "/home/nathan/.local/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/home/nathan/.local/lib/python2.7/site-packages/pip/commands/install.py", line 342, in run
prefix=options.prefix_path,
File "/home/nathan/.local/lib/python2.7/site-packages/pip/req/req_set.py", line 778, in install
requirement.uninstall(auto_confirm=True)
File "/home/nathan/.local/lib/python2.7/site-packages/pip/req/req_install.py", line 754, in uninstall
paths_to_remove.remove(auto_confirm)
File "/home/nathan/.local/lib/python2.7/site-packages/pip/req/req_uninstall.py", line 115, in remove
renames(path, new_path)
File "/home/nathan/.local/lib/python2.7/site-packages/pip/utils/__init__.py", line 267, in renames
shutil.move(old, new)
File "/usr/lib/python2.7/shutil.py", line 303, in move
os.unlink(src)
OSError: [Errno 13] Permission denied: '/usr/bin/docker-compose'

โ€”
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/docker/compose/issues/4874#issuecomment-305633147,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABCVnE5fR-MklThmz_Z7gJWCSWTwjK4Rks5r_zS1gaJpZM4Nov4S
.

that is what I did the second time. Could you just advise me what I need to do to blow docker away and start fresh?

I was able to fix it with the sudo -H options

sudo -H pip install docker-compose

pip uninstall docker-py; pip install -U docker-compose

This definitely helped with my issue:

Building event-webhook
Traceback (most recent call last):
  File "/usr/bin/docker-compose", line 11, in <module>
    load_entry_point('docker-compose==1.17.1', 'console_scripts', 'docker-compose')()
  File "/usr/lib/python2.7/dist-packages/compose/cli/main.py", line 68, in main
    command()
  File "/usr/lib/python2.7/dist-packages/compose/cli/main.py", line 121, in perform_command
    handler(command, command_options)
  File "/usr/lib/python2.7/dist-packages/compose/cli/main.py", line 952, in up
    start=not no_start
  File "/usr/lib/python2.7/dist-packages/compose/project.py", line 431, in up
    svc.ensure_image_exists(do_build=do_build)
  File "/usr/lib/python2.7/dist-packages/compose/service.py", line 318, in ensure_image_exists
    self.build()
  File "/usr/lib/python2.7/dist-packages/compose/service.py", line 923, in build
    shmsize=parse_bytes(build_opts.get('shm_size')) if build_opts.get('shm_size') else None,
TypeError: build() got an unexpected keyword argument 'stream'

Had to run it as SUDO

While running pip uninstall docker-py; pip install -U docker-compose on Cent OS 7 it is throwing
Found existing installation: subprocess32 3.2.6 ERROR: Cannot uninstall 'subprocess32'. 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.

and the problem still exists

Traceback (most recent call last): File "/bin/docker-compose", line 11, in <module> load_entry_point('docker-compose==1.18.0', 'console_scripts', 'docker-compose')() File "/usr/lib/python3.6/site-packages/compose/cli/main.py", line 71, in main command() File "/usr/lib/python3.6/site-packages/compose/cli/main.py", line 124, in perform_command handler(command, command_options) File "/usr/lib/python3.6/site-packages/compose/cli/main.py", line 959, in up start=not no_start File "/usr/lib/python3.6/site-packages/compose/project.py", line 452, in up svc.ensure_image_exists(do_build=do_build) File "/usr/lib/python3.6/site-packages/compose/service.py", line 308, in ensure_image_exists self.build() File "/usr/lib/python3.6/site-packages/compose/service.py", line 967, in build 'memory': parse_bytes(memory) if memory else None File "/usr/lib/python3.6/site-packages/docker/api/build.py", line 142, in build raise TypeError("You must specify a directory to build in path")

Was this page helpful?
0 / 5 - 0 ratings