我試圖安裝和使用泊塢窗,撰寫的第一次我的Ubuntu 14.04的機器上,但我沒有:))多克爾 - 撰寫啓動失敗
我已經安裝使用
通過PIP碼頭工人,組成當我嘗試運行docker-compose up
我得到這個錯誤跟蹤:
Traceback (most recent call last):
File "/usr/local/bin/docker-compose", line 7, in <module>
from compose.cli.main import main
File "/usr/local/lib/python2.7/dist-packages/compose/cli/main.py", line 41, in <module>
from . import errors
File "/usr/local/lib/python2.7/dist-packages/compose/cli/errors.py", line 10, in <module>
from docker.errors import APIError
File "/usr/local/lib/python2.7/dist-packages/docker/__init__.py", line 2, in <module>
from .api import APIClient
File "/usr/local/lib/python2.7/dist-packages/docker/api/__init__.py", line 2, in <module>
from .client import APIClient
File "/usr/local/lib/python2.7/dist-packages/docker/api/client.py", line 11, in <module>
from .build import BuildApiMixin
File "/usr/local/lib/python2.7/dist-packages/docker/api/build.py", line 9, in <module>
from .. import utils
File "/usr/local/lib/python2.7/dist-packages/docker/utils/__init__.py", line 2, in <module>
from .utils import (
File "/usr/local/lib/python2.7/dist-packages/docker/utils/utils.py", line 19, in <module>
from .. import tls
File "/usr/local/lib/python2.7/dist-packages/docker/tls.py", line 5, in <module>
from .transport import SSLAdapter
File "/usr/local/lib/python2.7/dist-packages/docker/transport/__init__.py", line 3, in <module>
from .ssladapter import SSLAdapter
File "/usr/local/lib/python2.7/dist-packages/docker/transport/ssladapter.py", line 22, in <module>
urllib3.connection.match_hostname = match_hostname
AttributeError: 'module' object has no attribute 'connection'
雞蛋版本:
$pip freeze | grep -e urllib3 -e requests -e docker-py
docker-pycreds==0.2.1
requests==2.13.0
urllib3==1.14
我試圖像這樣導出PYTHONPATH:
export PYTHONPATH=/usr/local/lib/python2.7/dist-packages:/usr/lib/python2.7/dist-packages
1.14是一個很老的版本。嘗試使用'pip install urllib3 --upgrade'升級它並且你可以檢查你的dist-packages中是否有多個urllib3(例如,試試'import urllib3; urllib3',我認爲它應該放在'/ usr/local/lib/python2.7/dist-packages/requests/packages/urllib3' – Zealseeker
我升級了我的urllib3版本到1.20,如果我輸入urllib3; urllib3,但是docker-compose不能啓動:( – kitz
I很抱歉誤會了你1.14並不是那麼古老我的urllib3版本是1.7,其中沒有連接模塊,從1.8開始添加(但是,我的docker-compose工作正常,我的'請求'版本是2.2 .1) – Zealseeker