devstack ContextualVersionConflict

时间:2017-03-21 17:37:21

标签: python openstack devstack

我在上一个稳定版本中启动stack.sh时出现以下错误:

sudo -H http_proxy= https_proxy= no_proxy= PIP_FIND_LINKS= SETUPTOOLS_SYS_PATH_TECHNIQUE=rewrite /usr/local/bin/pip2.7 install -c /opt/stack/requirements/upper-constraints.txt -e /opt/stack/glance
2017-03-21 17:32:36.166 | Ignoring dnspython3: markers 'python_version == "3.4"' don't match your environment
2017-03-21 17:32:36.404 | Obtaining file:///opt/stack/glance
2017-03-21 17:32:38.075 | Exception:
2017-03-21 17:32:38.075 | Traceback (most recent call last):
2017-03-21 17:32:38.075 |   File "/usr/local/lib/python2.7/dist-packages/pip/basecommand.py", line 215, in main
2017-03-21 17:32:38.075 |     status = self.run(options, args)
2017-03-21 17:32:38.075 |   File "/usr/local/lib/python2.7/dist-packages/pip/commands/install.py", line 335, in run
2017-03-21 17:32:38.075 |     wb.build(autobuilding=True)
2017-03-21 17:32:38.075 |   File "/usr/local/lib/python2.7/dist-packages/pip/wheel.py", line 749, in build
2017-03-21 17:32:38.075 |     self.requirement_set.prepare_files(self.finder)
2017-03-21 17:32:38.075 |   File "/usr/local/lib/python2.7/dist-packages/pip/req/req_set.py", line 380, in prepare_files
2017-03-21 17:32:38.075 |     ignore_dependencies=self.ignore_dependencies))
2017-03-21 17:32:38.075 |   File "/usr/local/lib/python2.7/dist-packages/pip/req/req_set.py", line 521, in _prepare_file
2017-03-21 17:32:38.075 |     req_to_install.check_if_exists()
2017-03-21 17:32:38.075 |   File "/usr/local/lib/python2.7/dist-packages/pip/req/req_install.py", line 1036, in check_if_exists
2017-03-21 17:32:38.075 |     self.req.name
2017-03-21 17:32:38.075 |   File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 558, in get_distribution
2017-03-21 17:32:38.075 |     dist = get_provider(dist)
2017-03-21 17:32:38.075 |   File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 432, in get_provider
2017-03-21 17:32:38.075 |     return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
2017-03-21 17:32:38.075 |   File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 968, in require
2017-03-21 17:32:38.075 |     needed = self.resolve(parse_requirements(requirements))
2017-03-21 17:32:38.075 |   File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 859, in resolve
2017-03-21 17:32:38.075 |     raise VersionConflict(dist, req).with_context(dependent_req)
2017-03-21 17:32:38.075 | ContextualVersionConflict: (keystoneauth1 2.4.3 (/usr/local/lib/python2.7/dist-packages), Requirement.parse('keystoneauth1>=2.16.0'), set(['castellan']))
2017-03-21 17:32:38.198 | +inc/python:pip_install:1                  exit_trap
2017-03-21 17:32:38.201 | +./stack.sh:exit_trap:487                  local r=2
2017-03-21 17:32:38.204 | ++./stack.sh:exit_trap:488                  jobs -p
2017-03-21 17:32:38.207 | +./stack.sh:exit_trap:488                  jobs=
2017-03-21 17:32:38.211 | +./stack.sh:exit_trap:491                  [[ -n '' ]]
2017-03-21 17:32:38.215 | +./stack.sh:exit_trap:497                  kill_spinner
2017-03-21 17:32:38.218 | +./stack.sh:kill_spinner:383               '[' '!' -z '' ']'
2017-03-21 17:32:38.222 | +./stack.sh:exit_trap:499                  [[ 2 -ne 0 ]]
2017-03-21 17:32:38.225 | +./stack.sh:exit_trap:500                  echo 'Error on exit'
2017-03-21 17:32:38.225 | Error on exit
2017-03-21 17:32:38.235 | +./stack.sh:exit_trap:501                  generate-subunit 1490117448 110 fail
2017-03-21 17:32:38.538 | +./stack.sh:exit_trap:502                  [[ -z /opt/stack/logs ]]
2017-03-21 17:32:38.541 | +./stack.sh:exit_trap:505                  /home/jbautista/Escritorio/devstack/tools/worlddump.py -d /opt/stack/logs
2017-03-21 17:32:38.741 | +./stack.sh:exit_trap:511                  exit 2

它今天开始失败,试图重新安装python但不知道究竟是什么问题

1 个答案:

答案 0 :(得分:1)

通过上面的日志阅读,由于版本冲突,这似乎是一个错误。

请参阅以下行:ContextualVersionConflict: (keystoneauth1 2.4.3 (/usr/local/lib/python2.7/dist-packages), Requirement.parse('keystoneauth1>=2.16.0'), set(['castellan']))

要求是针对keystoneauth1> = 2.16.0,但您的系统包含keystoneauth1 2.4.3。

您需要做的是将keystoneauth1软件包升级到最新版本,或者只是卸载软件包导致问题,再次运行./stack.sh脚本时,安装程​​序将自动安装所需的软件包。

$ sudo -H pip uninstall keystoneauth1

我希望这能解决你的问题。