CentOS7.6 裝完後運行python腳本報錯python
# python dingding.py 123ide
import requesturl
ImportError: No module named 'request'spa
解決:ip
wget --no-check-certificate https://pypi.python.org/packages/source/s/setuptools/setuptools-1.4.2.tar.gzget
tar xf setuptools-1.4.2.tar.gzrequests
cd setuptools-1.4.2it
python setup.py install
pip
cd ..io
wget --no-check-certificate https://pypi.python.org/packages/source/p/pip/pip-6.0.7.tar.gz
tar xf pip-6.0.7.tar.gz
cd pip-6.0.7
python setup.py install
安裝requests模塊
pip install requests
報錯
ImportError: No module named 'requests.packages.urllib3'
解決
# pip install --upgrade --force-reinstall 'requests==2.6.0' urllib3