1、首先在終端執行下Python命令:
報錯: ImportError: No module named request
百度查了下,是因為
參考了Stack Overflow的一個回答:ImportError: No module named requests
其中說到:可以通過pip來安裝這個缺失的module:
2、試了下 pip install request
還是報錯誒: Could not find a version that satisfies the requirement requests (from versions: none)
這個是因為 pip 版本過低? 建議使用:'pip install --upgrade pip' 進行升級。
3、 對 pip 進行升級:(參考:Python安裝庫Could not find a version that satisfies the requirement requests (from versions: none))
但其實要用 pip3:python3 -m pip install --upgrade pip
果然可以了: