エラー
$ docker-compose --version
Traceback (most recent call last):
File "/Users/yumainaura/.pyenv/versions/3.7.3/bin/docker-compose", line 5, in <module>
from compose.cli.main import main
File "/Users/yumainaura/.pyenv/versions/3.7.3/lib/python3.7/site-packages/compose/cli/main.py", line 17, in <module>
import docker
File "/Users/yumainaura/.pyenv/versions/3.7.3/lib/python3.7/site-packages/docker/__init__.py", line 2, in <module>
from .api import APIClient
File "/Users/yumainaura/.pyenv/versions/3.7.3/lib/python3.7/site-packages/docker/api/__init__.py", line 2, in <module>
from .client import APIClient
File "/Users/yumainaura/.pyenv/versions/3.7.3/lib/python3.7/site-packages/docker/api/client.py", line 8, in <module>
import websocket
File "/Users/yumainaura/.pyenv/versions/3.7.3/lib/python3.7/site-packages/websocket/__init__.py", line 23, in <module>
from ._app import WebSocketApp
File "/Users/yumainaura/.pyenv/versions/3.7.3/lib/python3.7/site-packages/websocket/_app.py", line 36, in <module>
from ._core import WebSocket, getdefaulttimeout
File "/Users/yumainaura/.pyenv/versions/3.7.3/lib/python3.7/site-packages/websocket/_core.py", line 34, in <module>
from ._handshake import *
File "/Users/yumainaura/.pyenv/versions/3.7.3/lib/python3.7/site-packages/websocket/_handshake.py", line 30, in <module>
from ._http import *
File "/Users/yumainaura/.pyenv/versions/3.7.3/lib/python3.7/site-packages/websocket/_http.py", line 31, in <module>
from ._socket import*
File "/Users/yumainaura/.pyenv/versions/3.7.3/lib/python3.7/site-packages/websocket/_socket.py", line 30, in <module>
from ._ssl_compat import *
AttributeError: module 'websocket._ssl_compat' has no attribute 'ssl'
調べる
docker コマンドはシステム ( たぶん Docker for Mac でインストールされたやつ ) のものを使っているが
docker-compose コマンドは python のものを利用していることが判明
which docker
/usr/local/bin/docker
which docker-compose
/Users/yumainaura/.pyenv/shims/docker-compose
解決
pip の docker-compose を使わないようにした
pip uninstall docker-compose
$ which docker-compose
/usr/local/bin/docker-compose
Original by Github issue
チャットメンバー募集
何か質問、悩み事、相談などあればLINEオープンチャットもご利用ください。