[root@master-95c3057126e1 /]# /usr/bin/python2 /usr/bin/operation
Traceback (most recent call last):
File "/usr/bin/operation", line 4, in
from operation_agent.agent import main
File "/usr/lib/python2.7/site-packages/operation_agent/agent.py", line 12, in
import operation
File "/usr/lib/python2.7/site-packages/operation_agent/operation.py", line 11, in
import requests
ImportError: No module named requests
[root@master-95c3057126e1 /]#
=========================================================
[root@master-95c3057126e1 /]# /usr/bin/python2 /usr/bin/operation
Traceback (most recent call last):
File "/usr/bin/operation", line 4, in
from operation_agent.agent import main
File "/usr/lib/python2.7/site-packages/operation_agent/agent.py", line 9, in
import pika
ImportError: No module named pika
========================================================
yum install -y python2-pika python-requests
=========================================================
python setup.py install
安装中出现错误
ImportError: No module named setuptools
wget
tar zxvf setuptools-0.6c11.tar.gz
cd setuptools-0.6c11
python setup.py build
python setup.py install
然后就可以import pika了
阅读(3699) | 评论(0) | 转发(0) |