安装此模块时出现“无模块命名请求”错误(错误后的更多详细信息):
[ ERROR ] Error in file '/Users/adikeller/Applications/GIT/BeAm/Beacon_4.10/STABILITY/beacon_stability_random_beacon_types.txt': Importing test library 'BeAm.beacon.tests.BeaconTesting' failed: ImportError: No module named requests
Traceback (most recent call last):
File "/Users/adikeller/Applications/GIT/BeAm/BeAm/beacon/tests.py", line 5, in <module>
from BeAm.beacon.counters import BeaconCounter
File "/Users/adikeller/Applications/GIT/BeAm/BeAm/beacon/counters.py", line 1, in <module>
import requests
PYTHONPATH:
/Users/adikeller/vevn/bin
/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg
/Users/adikeller/Applications/GIT/BeAm
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload
/Library/Python/2.7/site-packages
/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python
/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC
我已经完成的事情:
其他信息:
beacon_stability_random_beacon_types.txt:
*** Settings ***
Force Tags Critical template Conf=3 isTor=0 isSanity=0 headless rcmd
Library BeAm.beacon.tests.BeaconTesting WITH NAME BeaconTesting
Library Collections
Library BeAm.beacon.stability_and_stress_tests
Library BeAm.beacon.tests
Resource ../../BeAm/beacon/settings.txt
*** Test Cases ***
Create Test Object
[Tags] must
${TEST} = BeaconTesting.Get Beacon Test 3
Set Suite Variable ${TEST} ${TEST}
答案 0 :(得分:0)
请先尝试安装请求库,然后重试
$ sudo pip install requests