compose: ImportError: No module named urllib.parse
I am getting this error and don’t know what should i do,
I have tried to update six
using pip install -U six
but its up to date Requirement already up-to-date: six in /usr/lib/python2.7/site-packages
what should i do in order to solve this issue ?
λ - ~ $ python --version
Python 2.7.8
λ - ~ $ docker-compose --version
Traceback (most recent call last):
File "/usr/bin/docker-compose", line 9, in <module>
load_entry_point('docker-compose==1.1.0', 'console_scripts', 'docker-compose')()
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 348, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2311, in load_entry_point
return ep.load()
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2025, in load
entry = __import__(self.module_name, globals(),globals(), ['__name__'])
File "/usr/lib/python2.7/site-packages/compose/__init__.py", line 2, in <module>
from .service import Service # noqa:flake8
File "/usr/lib/python2.7/site-packages/compose/service.py", line 10, 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 # flake8: noqa
File "/usr/lib/python2.7/site-packages/docker/client.py", line 34, in <module>
import websocket
File "/usr/lib/python2.7/site-packages/websocket/__init__.py", line 22, in <module>
from ._core import *
File "/usr/lib/python2.7/site-packages/websocket/_core.py", line 41, in <module>
from ._url import *
File "/usr/lib/python2.7/site-packages/websocket/_url.py", line 23, in <module>
from six.moves.urllib.parse import urlparse
ImportError: No module named urllib.parse
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Comments: 38
I solved issue on my CentOS Linux release 7.1.1503 (Core) by running following commands:
pip install pyopenssl ndg-httpsclient pyasn1 pip install --upgrade urllib3 pip freeze | grep urllib urllib3==1.12
pip uninstall six pip install six pip install --upgrade six
I was having:
solved my problem:
@alejandrodnm +1