我正在运行Mac OS X
和Python
(版本2.7)。
显然我缺少requests
,但应该安装它。
$ python setup.py
Traceback (most recent call last):
File "setup.py", line 1, in <module>
import requests
ImportError: No module named requests
$ pip install requests
Requirement already satisfied: requests in /usr/local/lib/python2.7/site-packages
Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python2.7/site-packages (from requests)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/local/lib/python2.7/site-packages (from requests)
Requirement already satisfied: idna<2.7,>=2.5 in /usr/local/lib/python2.7/site-packages (from requests)
Requirement already satisfied: urllib3<1.23,>=1.21.1 in /usr/local/lib/python2.7/site-packages (from requests)
答案 0 :(得分:1)
alias python=/usr/local/bin/python3
解决了这个问题..