OpenStack DevStack 安装 Ubuntu 16.04

OpenStack DevStack 安装 Ubuntu 16.04

我正在尝试在全新安装的 Ubuntu 16.04 桌面上安装 OpenStack DevStack。

当出现以下错误时安装程序停止:

+inc/python:pip_install:359                env http_proxy= https_proxy= no_proxy= PIP_FIND_LINKS= SETUPTOOLS_SYS_PATH_TECHNIQUE=rewrite /opt/stack/requirements/.venv/bin/pip install -c /opt/stack/requirements/upper-constraints.txt -U pbr
env: ‘/opt/stack/requirements/.venv/bin/pip’: No such file or directory

我还看到很多关于 Python 版本的警告:

Ignoring asyncio: markers 'python_version == "3.4"' don't match your environment
Ignoring asyncio: markers 'python_version == "3.5"' don't match your environment
Ignoring dnspython3: markers 'python_version == "3.4"' don't match your environment
Ignoring dnspython3: markers 'python_version == "3.5"' don't match your environment
Ignoring mypy: markers 'python_version == "3.4"' don't match your environment
Ignoring mypy: markers 'python_version == "3.5"' don't match your environment
Ignoring jeepney: markers 'python_version == "3.4"' don't match your environment
Ignoring jeepney: markers 'python_version == "3.5"' don't match your environment
Ignoring SecretStorage: markers 'python_version == "3.4"' don't match your environment
Ignoring SecretStorage: markers 'python_version == "3.5"' don't match your environment
Ignoring typed-ast: markers 'python_version == "3.4"' don't match your environment
Ignoring typed-ast: markers 'python_version == "3.5"' don't match your environment
Ignoring pyldap: markers 'python_version == "3.4"' don't match your environment
Ignoring pyldap: markers 'python_version == "3.5"' don't match your environment
Requirement already satisfied: systemd-python===234 in /usr/local/lib/python2.7/dist-packages (from -c /opt/stack/requirements/upper-constraints.txt (line 401))
You are using pip version 9.0.3, however version 10.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

我正在运行 Python 2.7.12 和 3.5.1-3

我设置用户sudo useradd -d /bin/bash -d /opt/stack -m stack

谢谢

答案1

某个地方 virtualenv 无法将 pip 和其他 python 东西安装到 ~/requirements/.venv/ 中。对 DevStack 有更深入理解的人应该可以正确解决这个问题,但与此同时,手动运行以下命令为我解决了这个问题:

stack@mymachine:~/devstack$ virtualenv ../requirements/.venv/

答案2

经过一番挖掘,我发现在脚本之前运行以下命令可以使一切正常运行。提醒一下,我使用的是 16.04:

sudo apt-get install git python-pip
sudo pip install --upgrade pip

有趣的是,没有任何指南提到这一点,我猜想脚本应该安装它。我想知道自最初的 16.04 版本以来发生了什么变化?

我仍然收到所有 Python 警告(知道为什么吗?),但我现在有一个可运行的 DevStack 环境。

答案3

virtualenv只需添加一些详细信息,您在使用该命令时可能会收到一些权限被拒绝的错误。因此,首先授予777目录权限:

$ sudo chmod 777 /opt/stack/requirements/.venv
$ virtualenv /opt/stack/requirements/.venv/

相关内容