'ModuleNotFoundError: No module named 'requests' on Command Prompt
I'm using PyCharm and I'm using the requests module. However, I keep getting the same error while running it on Command Prompt (PyCharm doesn't give any errors):
ModuleNotFoundError: No module named 'requests'. However, I have installed it and it's even been listed in the installed modules section. This isn't a duplicate since in the other post, the module wasn't listed in the modules list. I have already remade the Pycharm project twice, but that didn't work. Even if I just take it out, it says the same thing about bs4.
Here's my complete import section:
import discord
from discord.ext import commands
import requests
import bs4
import random
Yes, I'm trying to make a Discord bot. I'll post any more code needed on request. Any help is appreciated. Thanks
Solution 1:[1]
Try to run from command prompt:
"pip install requests".
I had got the same problem. Program run great from PyCharm but displayed ModuleNotFoundError when runnig from command prompt. After running "pip install requests" problem has gone.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | xbox |
