报错内容如下:
Traceback (most recent call last):
File "/usr/bin/slowloris", line 9, in <module>
load_entry_point('Slowloris==0.1.4', 'console_scripts', 'slowloris')()
File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 299, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 2229, in load_entry_point
return ep.load()
File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 1948, in load
entry = __import__(self.module_name, globals(),globals(), ['__name__'])
File "/usr/lib/python2.6/site-packages/slowloris.py", line 2, in <module>
import socket, random, time, sys, argparse, random, logging, ssl
ImportError: No module named argparse
解决办法:
yum install python-argparse -y
原文链接:python报错No module named argparse,转载请注明来源!