No module named 'xgboost' when using pickle

Hi, I am trying to deploy a xgboost classifier using streamlit. I have the model trained in a jupyter notebook file in a different folder. in the folder that has the streamlit python script, i have installed venv and im running the app through the virtual environment. streamlit works perfectly but when I try to predict using the loaded pickle file, i get an error ‘no module named xgboost’ in it. so i did install xgboost inside the virtual environment, and when i try to run again i get the error ‘super object has no attribute get_params’.


and the code used to import the pickled model
data = np.array(inputs)
ser = pd.Series(data)
with open(‘xgb_classifier_model.pickle’,‘rb’) as modelFile:
model = pickle.load(modelFile)

prediction = model.predict(ser.to_frame().transpose())

my first question is - do i necessarily need to install xgboost and import it in the main script? (ive used the trained model in a jupyter notebook, different than the one in which it was trained, by using pickle and it ran perfectly)
my second question is - even if i install xgboost, i get the new error. is there a way to fix it?

any help would be really appreciated. i have attached the github repo link - GitHub - rohithandique/maverick-web-app