问题1
描述:
python包下载慢
解决方法:
找到pip.conf文件,没有的话在根目录下创建.pip目录,创建pip.conf,并写入
$ sudo find -name pip.conf
修改该文件:
[global]
index-url = http://pypi.douban.com/simple
trusted-host=pypi.douban.com
问题2
报错:
installed pip version 1 does not meet minimum requirements [ERROR]
/opt/stack/devstack/inc/python:146 Currently installed pip version 1
does not meet minimum requirements (>=6).
解决方法:
‘/opt/stack/devstack/inc/python’ line 142 to 148
local pip_version
pip_version=$(python -c "import pip; \
print(pip.__version__.strip('.')[0])")
if (( pip_version<6 )); then
die $LINENO "Currently installed pip version ${pip_version} does not" \
"meet minimum requirements (>=6)."
fi
修改/opt/stack/devstack/inc/python文件,替换strip为split,结果如下:
local pip_version
pip_version=$(python -c "import pip; \
print(pip.__version__.split('.')[0])")
if (( pip_version<6 )); then
die $LINENO "Currently installed pip version ${pip_version} does not" \
"meet minimum requirements (>=6)."
fi
问题3
报错:
pip not found in /opt/stack/.vnc/bin/
解决办法:
$ cd /opt/stack/.vnc/bin/
$ sudo ln -sf /usr/local/bin/pip pip
问题4
报错:
/opt/stack/devstack/inc/python: line 540: /opt/stack/requirements/.venv/bin/edit-constraints: No such file or directory
解决方法:
edit-constraints
是 openstack-requirement
的一部分,问题来自于没有成功安装,需要重新执行一次,然后再配置链接
$ su root
$ python /opt/stack/requirements/setup.py install
此时已经安装了,还需要配置了链接
$ su stack
$ cd /opt/stack/.vnc/bin/
$ ln -sf /usr/local/bin/normalize-requirements normalize-requirements
$ ln -sf /usr/local/bin/build-lower-constraints build-lower-constraints
$ ln -sf /usr/local/bin/validate-projects validate-projects
$ ln -sf /usr/local/bin/edit-constraints edit-constraints
$ ln -sf /usr/local/bin/check-conflicts check-conflicts
$ ln -sf /usr/local/bin/check-constraints check-constraints
$ ln -sf /usr/local/bin/validate-constraints validate-constraints
$ ln -sf /usr/local/bin/generate-constraints generate-constraints
$ ln -sf /usr/local/bin/check-python2-support check-python2-support
$ ln -sf /usr/local/bin/update-requirements update-requirements
问题5
报错:
ERROR: Cannot uninstall ‘xxx’. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
解决方法:
$ find / -name "*xxx*.egg-info" -exec rm -rf {} \;
注意:如果“xxx”中包含连接符,可能变成下划线
问题6
报错:
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.6m -I/opt/stack/tempest/.tox/tempest/include/python3.6m -c ext/_yaml.c -o build/temp.linux-x86_64-3.6/ext/_yaml.o
ext/_yaml.c:4:10: fatal error: Python.h: No such file or directory
解决方法:
从报错内容可以看出/usr/include/python3.6m
目录下面没有Python.h
安装python3-dev
$ apt-get install python3-dev
问题7
报错:
tempest requires Python ‘>=3.6’ but the running Python is 3.5.2
解决方法:
devstack默认使用tempest进行测试,只需要把这个功能关闭即可
在local.conf
中添加
INSTALL_TEMPEST=false