pip安装docker失败

时间:2016-05-31 14:59:55

标签: python pip python-venv

此问题与this onethis one有关。我正在尝试在新创建的python虚拟环境中安装和运行docker(-compose):

$ mkdir temp_venv
$ cd temp_venv
$ virtualenv venv
$ source venv/bin/activate
(venv) $ pip list
pip (8.1.2)
setuptools (21.2.2)
wheel (0.29.0)

docker-compose 通过pip成功安装,但是当我尝试安装docker时,会抛出以下错误:

(venv) $ pip install docker
Collecting docker
  Could not find a version that satisfies the requirement docker (from versions: )
No matching distribution found for docker

尝试使用 - pre 标志设置安装会返回相同的错误。此外,当尝试在venv中运行docker时,会出现以下错误:

WARNING: The "bootstrap" service specifies a port on the host. If multiple containers for this service are created on a single host, the port will clash.
ERROR: Couldn't connect to Docker daemon. You might need to install Docker:

使用 pip2 安装 docker-compose 会产生同样的错误(对于docker也是如此:

Collecting docker
  Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.python.org', port=443): Read timed out. (read timeout=15)",)': /simple/docker/
  Could not find a version that satisfies the requirement docker (from versions: )
No matching distribution found for docker
). 

0 个答案:

没有答案