I am trying to make a website with Django that can get Reddit user's data with a module called PRAW

In my views.py for the app called Data, I tried to import PRAW and do things with it and template things with Django.

I am using PyCharm, so the module PRAW has already been installed in my VirtualEnv. There were no errors importing PRAW in the file alone as well. (I ran the file directly in PyCharm and no error showed up)

However, when I run the server, I get: ModuleNotFoundError: No module named 'praw'

Imports made in views.py

from django.shortcuts import render, redirect
import praw

Something wrong happens with the import praw statement when server is ran for some reason.

Thanks in advance.


Open cmd in venv directory. activate virtual env "Scripts\activate" install praw "pip install praw" it shouldnt show the error msg now, even though it might marked with red line in pycharm just run your script ftom cmd with "python filename.py"

Related Query