pull/243/merge
gjmzj 2018-06-14 00:20:16 +08:00
parent 1eca6b0da9
commit 1b5fba6f2f
2 changed files with 24 additions and 1 deletions

View File

@ -62,6 +62,29 @@ yum install git python-pip -y
pip install pip --upgrade -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com pip install pip --upgrade -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
pip install --no-cache-dir ansible -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com pip install --no-cache-dir ansible -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
``` ```
在`Ubuntu 16.04`中,如果出现以下错误:
``` bash
Traceback (most recent call last):
File "/usr/bin/pip", line 9, in <module>
from pip import main
ImportError: cannot import name main
```
将`/usr/bin/pip`做以下修改:
``` bash
#原代码
from pip import main
if __name__ == '__main__':
sys.exit(main())
#修改后
from pip import __main__
if __name__ == '__main__':
sys.exit(__main__._main())
```
### 4.在deploy节点配置免密码登陆 ### 4.在deploy节点配置免密码登陆
``` bash ``` bash

View File

@ -51,7 +51,7 @@ Traceback (most recent call last):
from pip import main from pip import main
ImportError: cannot import name main ImportError: cannot import name main
``` ```
将`/usr/bin/python`做以下修改: 将`/usr/bin/pip`做以下修改:
``` bash ``` bash
#原代码 #原代码