CentOS7.6 裝完后運(yùn)行python腳本報(bào)錯(cuò)
創(chuàng)新互聯(lián)主營朝陽縣網(wǎng)站建設(shè)的網(wǎng)絡(luò)公司,主營網(wǎng)站建設(shè)方案,app軟件定制開發(fā),朝陽縣h5小程序開發(fā)搭建,朝陽縣網(wǎng)站營銷推廣歡迎朝陽縣等地區(qū)企業(yè)咨詢
# python dingding.py 123
import request
ImportError: No module named 'request'
解決:
wget --no-check-certificate https://pypi.python.org/packages/source/s/setuptools/setuptools-1.4.2.tar.gz
tar xf setuptools-1.4.2.tar.gz
cd setuptools-1.4.2
python setup.py install
cd ..
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
報(bào)錯(cuò)
ImportError: No module named 'requests.packages.urllib3'
解決
# pip install --upgrade --force-reinstall 'requests==2.6.0' urllib3