【Shiro_exploit】PYTHON报错解决:ModuleNotFoundError: No module named 'requests'

在这里插入图片描述
在复现Apache Shiro 漏洞时,发现自己的python环境各种报错,值得注意的就是如下:

Traceback (most recent call last):
  File "shiro_exploit.py", line 7, in <module>
    import requests
ModuleNotFoundError: No module named 'requests'

解决方法:

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
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
pip install requests

如果遇到报错:

ImportError: No module named 'requests.packages.urllib3'

解决方式:

pip install --upgrade --force-reinstall 'requests==2.6.0' urllib3

你可能感兴趣的:(安全渗透,系统配置,python,error,shiro)