ModuleNotFoundError: No module named 'requests'

 //here I have an example python code this will hit the side with endless for testing purpose only.


import requests
import threading

url = ''
#the data variable name you should get from the site background
data = {
'username': 'username',
'password': 'password',
}
#below while make this hit endless
def do_request():
while True:
response = requests.post(url,data=data).text
print(response)
threads = []
for i in range(50):
t = threading.Thread(target=do_request)
t.daemon = True
threads.append(t)
for i in range(50):
threads[i].start()

for i in range(50):
threads[i].join()


//here having error when execute this script, before you should have to fill those missing data information and url you want to test.

D:\Python\venv\Scripts\python.exe D:/Python/venv/Scripts/site_load.py

Traceback (most recent call last):

  File "D:\Python\venv\Scripts\site_load.py", line 1, in <module>

    import requests

ModuleNotFoundError: No module named 'requests'


Process finished with exit code 1


//i'm going to test this same script on linux

//still continue in windows then should need to install request module






Post a Comment

0 Comments