Red Hat Bugzilla – Bug 1280295
[abrt] docker-compose: service.py:12:<module>:ImportError: cannot import name create_host_config
Last modified: 2015-11-12 06:44:06 EST
Description of problem:
docker-compose restart app
Version-Release number of selected component:
cmdline: /usr/bin/python2 /usr/bin/docker-compose restart app
runlevel: N 5
#1 <module> in /usr/lib/python2.7/site-packages/compose/service.py:12
#2 <module> in /usr/lib/python2.7/site-packages/compose/project.py:12
#3 <module> in /usr/lib/python2.7/site-packages/compose/cli/main.py:16
#4 resolve in /usr/lib/python2.7/site-packages/pkg_resources/__init__.py:2361
#5 load in /usr/lib/python2.7/site-packages/pkg_resources/__init__.py:2355
#6 load_entry_point in /usr/lib/python2.7/site-packages/pkg_resources/__init__.py:2682
#7 load_entry_point in /usr/lib/python2.7/site-packages/pkg_resources/__init__.py:558
#8 <module> in /usr/bin/docker-compose:9
Created attachment 1092680 [details]
Created attachment 1092681 [details]
I suspect that you were running a pre-release version of F23. Please update python-docker-py to release version (1.3.1-1) and try again.
That's the version I have installed.
I can't reproduce this on a freshly installed F23. docker-compose restart <name> is simply restarting the container as expected.
There are some things you can try:
* Ensure that you're up to date, with: dnf distro-sync
* Verify the integrity of installed RPMs, with: rpm -Va
(And dnf reinstall any RPMs which have corrupt or missing files)
In particular, I suspect your python-docker-py package is not installed correctly, has corrupt or missing files, or is unreadable for some reason. You may try reinstalling this package.
None of those worked.
However, I investigated more through a python shell and discovered that I had some packages left in my user's pip path.
This fixed it: rm -Rf ~/.local/lib/