warning警告问题解决1
warning警告问题, 这时可以不去管它, 但如果想解决, 可以这样做:
c:\python\lib\site-packages\locust\core.py:17: MonkeyPatchWarning: Monkey-patching ssl after ssl has already been imported may lead to errors, including RecursionError on Python 3.6. It may also silently lead to incorrect behaviour on Python 3.7. Please monkey-patch earlier. See https://github.com/gevent/gevent/issues/1016. Modules that had direct imports (NOT patched): ['urllib3.util (c:\\python\\lib\\site-packages\\urllib3\\util\\__init__.py)', 'urllib3.contrib.pyopenssl (c:\\python\\lib\\site-packages\\urllib3\\contrib\\pyopenssl.py)'].
monkey.patch_all()
1、找到相应的路径下的文件:
2、添加以下三行代码
import gevent
from gevent import monkey
monkey.patch_all()