最佳答案
我最近在我的 Windows10机器上安装了 DockerToolbox。
但是,每当我运行 docker-compose up
时,都会收到以下错误消息:
Traceback (most recent call last):
File "<string>", line 3, in <module>
File "compose\cli\main.py", line 65, in main
File "compose\cli\main.py", line 117, in perform_command
File "compose\cli\main.py", line 849, in up
File "compose\project.py", line 372, in up
File "compose\project.py", line 539, in warn_for_swarm_mode
File "site-packages\docker\api\daemon.py", line 33, in info
File "site-packages\docker\utils\decorators.py", line 47, in inner
File "site-packages\docker\client.py", line 139, in _get
File "site-packages\requests\sessions.py", line 488, in get
File "site-packages\requests\sessions.py", line 475, in request
File "site-packages\requests\sessions.py", line 596, in send
File "site-packages\requests\adapters.py", line 423, in send
File "site-packages\requests\packages\urllib3\connectionpool.py", line 595, in urlopen
File "site-packages\requests\packages\urllib3\connectionpool.py", line 363, in _make_request
File "httplib.py", line 1057, in request
File "httplib.py", line 1097, in _send_request
File "httplib.py", line 1053, in endheaders
File "httplib.py", line 897, in _send_output
File "httplib.py", line 859, in send
File "site-packages\docker\transport\npipeconn.py", line 31, in connect
File "site-packages\docker\transport\npipesocket.py", line 22, in wrapped
File "site-packages\docker\transport\npipesocket.py", line 49, in connect
pywintypes.error: (2, 'WaitNamedPipe', 'The system cannot find the file specified.')
docker-compose returned -1
注意,在我的 使用者和 系统环境变量中都有 C:\Python27
和 C:\Python27\Scripts
。我还用 Python3尝试了这种方法,但仍然无法工作。