Pip 安装失败 - 已知错误
Pip install failure - Known Bug
从本周开始,我的 vagrant 构建不再工作,因为每当我构建新机器时都会发生 pip 错误,我现有的机器有一个 pip 的工作副本。我正在使用 ubuntu/trusty64 配置 `vagrant 机器,第一个命令是:
sudo apt-get install python-pip
然而 运行 sudo pip install something
失败并出现错误
ImportError:No module packaging.version.
command/usr/binpython -c "import setuptools, tokenize;__file__=`/tmp/pip_build_root/defusexml/setup.py'; exec(compil(getattr(tokenize, 'open')(__file__).read().replace('\r\n', '\n'), __file__, 'exec')) install --record /tmp/pip-wVb4Du-record/install-record.txt --single-version-externally-managed --compile failed with erro code 1 in /tmp/pip_build_root/defusedxml Storing debug log for failure in /home/vagrant/.pip/pip.log
我启动了一台新机器并安装了 pip,它安装时没有任何错误。这是一个新问题,过去 6 个月我一直在为机器配置相同的文件。有没有办法解决这个问题,他们改变了依赖关系吗?
经过更多研究后发现这是最近引入的已知错误 https://bugs.launchpad.net/ubuntu/+source/python-pip/+bug/1658844。
解决方法是通过 python-setuptools 使用 easy_install 安装 pip 并且 pip 会工作。
从本周开始,我的 vagrant 构建不再工作,因为每当我构建新机器时都会发生 pip 错误,我现有的机器有一个 pip 的工作副本。我正在使用 ubuntu/trusty64 配置 `vagrant 机器,第一个命令是:
sudo apt-get install python-pip
然而 运行 sudo pip install something
失败并出现错误
ImportError:No module packaging.version.
command/usr/binpython -c "import setuptools, tokenize;__file__=`/tmp/pip_build_root/defusexml/setup.py'; exec(compil(getattr(tokenize, 'open')(__file__).read().replace('\r\n', '\n'), __file__, 'exec')) install --record /tmp/pip-wVb4Du-record/install-record.txt --single-version-externally-managed --compile failed with erro code 1 in /tmp/pip_build_root/defusedxml Storing debug log for failure in /home/vagrant/.pip/pip.log
我启动了一台新机器并安装了 pip,它安装时没有任何错误。这是一个新问题,过去 6 个月我一直在为机器配置相同的文件。有没有办法解决这个问题,他们改变了依赖关系吗?
经过更多研究后发现这是最近引入的已知错误 https://bugs.launchpad.net/ubuntu/+source/python-pip/+bug/1658844。
解决方法是通过 python-setuptools 使用 easy_install 安装 pip 并且 pip 会工作。