I have a python code for attendance system which I'm trying to run in raspberry pi. I'm using python 3.9.2 and have installed all the required libraries through terminal. The code runs fine in Thonny but when I try to run the same code in terminal I'm getting the following error:
Traceback (most recent call last):
File "/home/pi/Desktop/pa.py", line 1, in <module>
import shutils
ModuleNotFoundError: No module named 'shutils'
I thought it's an issue with just shutils library but it's not. I'm getting the same error for all the libraries except one. These are the libraries I'm using:
import shutils
import pygame
import imutils
import cv2
import numpy as np
import face_recognition
import os
from datetime import datetime
import requests
import pysqlite3
import mysql.connector
Here pygame library has no issue in running through terminal as it showed the following after commenting 1st line:
pygame 1.9.6
Hello from the pygame community. https://www.pygame.org/contribute.html
but all other libraries are showing the same error as mentioned above.
Please help me to find a solution for this, Thanks in advance.