When I use
import psycopg2
in Scrapy pipeline.py or spider.py I get the following error
ModuleNotFoundError: No module named 'psycopg2'
I know that the error is not valid, because I am running Django server with postgresql, using same venv which contains psycopg2. And also I can connect to db in a test file and enquiry as well. In addition I can run import psycopg2 in Scrapy shell with no issue. So it has puzzled me that I might be missing something, I appreciate if someone can help me,